etcd

package
v0.0.0-...-7fad99f Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExist = errors.New("already exists")
	ErrNotFound     = errors.New("not found")
)
View Source
var ErrInconsistentState = errors.New("domain state is inconsistent to etcd")
View Source
var ErrMissingLease = errors.New("missing lease on key")

Functions

func CreateSubscription

func CreateSubscription(ctx context.Context, client *clientv3.Client, topic types.Topic, id types.SubscriptionId) error

func CreateTopic

func CreateTopic(ctx context.Context, client *clientv3.Client, topic types.Topic, size types.HashRangeSize) error

Types

type TailSession

type TailSession struct {
	Sess *concurrency.Session
}

func NewTailSession

func NewTailSession(client *clientv3.Client) (*TailSession, error)

func (*TailSession) Close

func (s *TailSession) Close() error

func (*TailSession) Commit

func (s *TailSession) Commit(ctx context.Context, b *domain.Bookmark) error

func (*TailSession) LeaseBookmark

func (s *TailSession) LeaseBookmark(ctx context.Context, b *domain.Bookmark, new []*domain.Bookmark, deletions []*domain.Bookmark) error

func (*TailSession) RevokeBookmark

func (s *TailSession) RevokeBookmark(ctx context.Context, b *domain.Bookmark) error

type Watcher

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

func NewWatcher

func NewWatcher(client *clientv3.Client, service *gateway.TopicService) *Watcher

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context, errCh chan error, restoredCh chan struct{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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