etcdv3

package
v0.0.0-...-39db037 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdV3

type EtcdV3 interface {
	// Serve accepts a listener and launches the ETCD v3 server.
	Serve(net.Listener) error
	// Shutdown closes the ETCD v3 server.
	Shutdown(context.Context) error
	// PushEvents accepts a bunch of events and converts them to ETCD events,
	// then sending to watch clients.
	PushEvents([]types.Event)
}

EtcdV3 abstracts the behaviors of the mimicking ETCD v3 server.

func NewEtcdV3Server

func NewEtcdV3Server(cfg *config.Config, cache cache.Cache, revisioner Revisioner) (EtcdV3, error)

NewEtcdV3Server creates the ETCD v3 server.

type Revisioner

type Revisioner interface {
	// Revision returns the current revision.
	Revision() int64
}

Revisioner defines how to get the current revision.

Jump to

Keyboard shortcuts

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