etcdv3

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROOT        = "workers/services"
	LOCK        = "lock"
	EmptyString = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

type Mutex struct {
	// contains filtered or unexported fields
}

func (*Mutex) Lock

func (m *Mutex) Lock() error

func (*Mutex) UnLock

func (m *Mutex) UnLock() error

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewRedisSession

func NewRedisSession(redis *redis.Client) (*Session, error)

func (*Session) HDel

func (s *Session) HDel(ctx context.Context, key string, fields ...string) error

func (*Session) HGet

func (s *Session) HGet(ctx context.Context, k string, field string) (string, error)

func (*Session) HGetAll

func (s *Session) HGetAll(ctx context.Context, key string) (map[string]string, error)

func (*Session) HSet

func (s *Session) HSet(ctx context.Context, k, field string, value interface{}) error

func (*Session) HWatch

func (s *Session) HWatch(ctx context.Context, key string, interval time.Duration) <-chan map[string]string

func (*Session) KeepAlive

func (s *Session) KeepAlive(ctx context.Context, key string, fieldFunc func() (f, v string), interval time.Duration)

func (*Session) NewMutex

func (s *Session) NewMutex(ctx context.Context, key string) *Mutex

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL