client

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEtcdClientFactory

func RegisterEtcdClientFactory(name kstonev1alpha2.EtcdStorageBackend, factory Factory)

RegisterEtcdClientFactory registers the specified etcd client

Types

type Factory

type Factory func(cluster *VersionContext) (VersionClient, error)

type Member

type Member struct {
	ID         string
	Name       string
	PeerURLs   []string
	ClientURLs []string
	Version    string
	IsLearner  bool
	Leader     string
}

Member contains member info including v2 and v3

type VersionClient

type VersionClient interface {
	MemberList() ([]Member, error)
	Status(endpoint string) (*Member, error)
	Close()
}

func GetEtcdClientProvider

func GetEtcdClientProvider(
	name kstonev1alpha2.EtcdStorageBackend,
	ctx *VersionContext,
) (VersionClient, error)

GetEtcdClientProvider gets the specified etcd client

type VersionContext

type VersionContext struct {
	Config *etcd.ClientConfig
}

Directories

Path Synopsis
v2
v3

Jump to

Keyboard shortcuts

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