Versions in this module Expand all Collapse all v0 v0.2.1 Dec 24, 2021 Changes in this version + var ProviderSet = wire.NewSet(NewID, NewLocker, NewTransaction) + type ID struct + func NewID(conf *config.AppConfig, client pb.IdSvcClient) *ID + func (i *ID) Generate(ctx context.Context) int64 + type Lock struct + func (l *Lock) Release() error + type Locker struct + func NewLocker(client *etcd.Client) *Locker + func (l *Locker) Acquire(key string, opts ...LockerOpt) (*Lock, error) + type LockerOpt func(op *Operation) + func WithAcquireTimeout(timeout time.Duration) LockerOpt + func WithLockTTL(ttl time.Duration) LockerOpt + func WithTry(try bool) LockerOpt + type Operation struct + AcquireTimeout time.Duration + TTL time.Duration + Try bool + type Transaction struct + func NewTransaction(conf *config.AppConfig) *Transaction + func (t *Transaction) TCC(tccFunc dtmgrpc.TccGlobalFunc) (string, error)