etcdproxy

package
v0.0.0-...-f584327 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdProxy

type EtcdProxy interface {
	// EtcdProxyEnabled returns if the etcd proxy is enabled
	EtcdProxyEnabled() bool

	// Txn forward txn unary request to leader
	Txn(ctx context.Context, txn *etcdserverpb.TxnRequest) (*etcdserverpb.TxnResponse, error)

	// Watch forward watch stream request to leader
	Watch(ctx context.Context, key string, revision uint64) (<-chan []*mvccpb.Event, error)
}

EtcdProxy forward etcd-style rpc request to leader for compatibility of k8s apiserver community edition

func NewDisabledEtcdProxy

func NewDisabledEtcdProxy() EtcdProxy

func NewEtcdProxy

func NewEtcdProxy(leaderElection leader.LeaderElection, tlsConfig *tls.Config) EtcdProxy

NewEtcdProxy return an ETCD proxy for forward request to leader

Jump to

Keyboard shortcuts

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