MCPcopy Create free account
hub / github.com/erpc/erpc / TryUpdateIfStale

Method TryUpdateIfStale

data/shared_state_variable.go:23–23  ·  view source on GitHub ↗
(ctx context.Context, staleness time.Duration, getNewValue func(ctx context.Context) (int64, error))

Source from the content-addressed store, hash-verified

21 SharedVariable
22 GetValue() int64
23 TryUpdateIfStale(ctx context.Context, staleness time.Duration, getNewValue func(ctx context.Context) (int64, error)) (int64, error)
24 TryUpdate(ctx context.Context, newValue int64) int64
25 OnValue(callback func(int64))
26 OnLargeRollback(callback func(currentVal, newVal int64))

Implementers 1

counterInt64data/shared_state_variable.go

Calls

no outgoing calls