Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter interface { // Applies by the given delta (+ or -) and return the updated value. // Returns (updated value, true if value was updated in memory, err if any error happened) // It is possible that the value is updated but an error occurred while trying to persist it. Increment(context.Context, int) (int, bool, error) Refresh(context.Context) (int, error) Delete(context.Context) error }
func NewEtcdCounter ¶
func NewEtcdCounter(c *etcdclientv3.Client, key string, initialValue int) Counter
Click to show internal directories.
Click to hide internal directories.