Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStaticPartitions ¶
func NewStaticPartitions(memberCount int) [][]PartitionID
NewStaticPartitions naively assigns partitions to a static number of members. Useful when not using a dynamic means of assignment (testing, static clusters, etc.)
Types ¶
type ClientSet ¶
type ClientSet struct {
ClientV3 *clientv3.Client
KV etcdserverpb.KVClient
Lease etcdserverpb.LeaseClient
GRPC *grpc.ClientConn
WatchStatus *watch.Status
}
ClientSet holds various clients used to access etcd.
func NewClientSet ¶
func NewClientSet(gc *GrpcContext, endpointURL string) (*ClientSet, error)
type CoordinatorClientSet ¶
type CoordinatorClientSet struct {
*ClientSet
ClockReconstitutionLock *concurrency.Mutex
}
CoordinatorClientSet is ClientSet plus extra fields that only pertain to coordinator clusters.
func InitCoordinator ¶
func InitCoordinator(gc *GrpcContext, endpointURL string) (*CoordinatorClientSet, error)
type GrpcContext ¶
type GrpcContext struct {
GrpcKeepaliveInterval time.Duration
GrpcKeepaliveTimeout time.Duration
TLS *tls.Config
}
GrpcContext contains common values used to set up gRPC connections across the fleet of clusters.
func (*GrpcContext) LoadPKI ¶
func (g *GrpcContext) LoadPKI(clientCert, clientKey, caCert string) error
type MemberID ¶
type MemberID int64
MemberID is a monotonic ID. As members are added, this can only go up.
type PartitionID ¶
type PartitionID int8
PartitionID references one of the partitions implied by partitionCount.
Click to show internal directories.
Click to hide internal directories.