Documentation ¶
Index ¶
- type Connector
- type Option
- func WithClusterID(clusterID types.ClusterID) Option
- func WithConnectTimeout(connTimeout time.Duration) Option
- func WithDefaultGRPCDialOptions(grpcDialOpts ...grpc.DialOption) Option
- func WithInitCount(initCount int) Option
- func WithInitRetryInterval(interval time.Duration) Option
- func WithLogger(logger *zap.Logger) Option
- func WithRPCTimeout(rpcTimeout time.Duration) Option
- func WithSeed(seed []string) Option
- func WithUpdateInterval(interval time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector interface { io.Closer ClusterID() types.ClusterID NumberOfMR() int ActiveMRs() map[types.NodeID]string ConnectedNodeID() types.NodeID Client(ctx context.Context) (mrc.MetadataRepositoryClient, error) ManagementClient(ctx context.Context) (mrc.MetadataRepositoryManagementClient, error) AddRPCAddr(nodeID types.NodeID, addr string) DelRPCAddr(nodeID types.NodeID) }
Connector represents a connection proxy for the metadata repository. It contains clients and management clients for the metadata repository.
type Option ¶
type Option func(*config)
func WithClusterID ¶
WithClusterID sets cluster ID of MR cluster.
func WithConnectTimeout ¶
WithConnectTimeout sets a timeout to connect to the MR.
func WithDefaultGRPCDialOptions ¶ added in v0.21.0
func WithDefaultGRPCDialOptions(grpcDialOpts ...grpc.DialOption) Option
func WithInitCount ¶
WithInitCount sets the maximum number of tries to connect to the given seed and fetch addresses of MRs.
func WithInitRetryInterval ¶
WithInitRetryInterval sets the interval between tries to initialize.
func WithLogger ¶
func WithRPCTimeout ¶
WithRPCTimeout sets a timeout to call RPC methods to the MR.
func WithSeed ¶
WithSeed sets seed addresses of MRs that can be used to fetch addresses of MRs initially. Seed is an immutable list of addresses of MRs.
func WithUpdateInterval ¶
WithUpdateInterval sets the interval between updates of information of MR cluster.