control

package
v0.0.0-...-73798e1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Discover_FullMethodName       = "/control.Service/Discover"
	Service_Register_FullMethodName       = "/control.Service/Register"
	Service_NewSession_FullMethodName     = "/control.Service/NewSession"
	Service_GetClusterInfo_FullMethodName = "/control.Service/GetClusterInfo"
)

Variables

View Source
var (
	ServerType_name = map[int32]string{
		0: "Unknown",
		1: "Control",
		2: "Data",
		3: "Api",
	}
	ServerType_value = map[string]int32{
		"Unknown": 0,
		"Control": 1,
		"Data":    2,
		"Api":     3,
	}
)

Enum value maps for ServerType.

View Source
var (
	ReplicaState_name = map[int32]string{
		0: "Stopped",
		1: "Joining",
		2: "Voter",
		3: "NonVoter",
		4: "Leaving",
	}
	ReplicaState_value = map[string]int32{
		"Stopped":  0,
		"Joining":  1,
		"Voter":    2,
		"NonVoter": 3,
		"Leaving":  4,
	}
)

Enum value maps for ReplicaState.

View Source
var File_internal_control_control_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Discover",
			Handler:    _Service_Discover_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _Service_Register_Handler,
		},
		{
			MethodName: "GetClusterInfo",
			Handler:    _Service_GetClusterInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "NewSession",
			Handler:       _Service_NewSession_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "internal/control/control.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func IsValidAddress

func IsValidAddress(value string) bool

func IsValidClusterName

func IsValidClusterName(value string) bool

func IsValidPartitionCount

func IsValidPartitionCount(value uint32) bool

func IsValidTag

func IsValidTag(value string) bool

func IsValidTags

func IsValidTags(values ...string) bool

func IsValidToken

func IsValidToken(value string) bool

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ApiServerConfig

type ApiServerConfig struct {
	ETag           string `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	PartitionCount uint32 `protobuf:"varint,2,opt,name=partition_count,json=partitionCount,proto3" json:"partition_count,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiServerConfig) Descriptor deprecated

func (*ApiServerConfig) Descriptor() ([]byte, []int)

Deprecated: Use ApiServerConfig.ProtoReflect.Descriptor instead.

func (*ApiServerConfig) GetETag

func (x *ApiServerConfig) GetETag() string

func (*ApiServerConfig) GetPartitionCount

func (x *ApiServerConfig) GetPartitionCount() uint32

func (*ApiServerConfig) ProtoMessage

func (*ApiServerConfig) ProtoMessage()

func (*ApiServerConfig) ProtoReflect

func (x *ApiServerConfig) ProtoReflect() protoreflect.Message

func (*ApiServerConfig) Reset

func (x *ApiServerConfig) Reset()

func (*ApiServerConfig) String

func (x *ApiServerConfig) String() string

func (*ApiServerConfig) Validate

func (x *ApiServerConfig) Validate() error

type ApiServerStatus

type ApiServerStatus struct {
	// contains filtered or unexported fields
}

func (*ApiServerStatus) Descriptor deprecated

func (*ApiServerStatus) Descriptor() ([]byte, []int)

Deprecated: Use ApiServerStatus.ProtoReflect.Descriptor instead.

func (*ApiServerStatus) ProtoMessage

func (*ApiServerStatus) ProtoMessage()

func (*ApiServerStatus) ProtoReflect

func (x *ApiServerStatus) ProtoReflect() protoreflect.Message

func (*ApiServerStatus) Reset

func (x *ApiServerStatus) Reset()

func (*ApiServerStatus) String

func (x *ApiServerStatus) String() string

func (*ApiServerStatus) Validate

func (x *ApiServerStatus) Validate() error

type ApiServers

type ApiServers struct {
	ETag              string                        `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	Servers           map[uint64]*ApiServers_Server `` /* 156-byte string literal not displayed */
	ServiceConfigJson string                        `protobuf:"bytes,3,opt,name=service_config_json,json=serviceConfigJson,proto3" json:"service_config_json,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiServers) Descriptor deprecated

func (*ApiServers) Descriptor() ([]byte, []int)

Deprecated: Use ApiServers.ProtoReflect.Descriptor instead.

func (*ApiServers) GetETag

func (x *ApiServers) GetETag() string

func (*ApiServers) GetServers

func (x *ApiServers) GetServers() map[uint64]*ApiServers_Server

func (*ApiServers) GetServiceConfigJson

func (x *ApiServers) GetServiceConfigJson() string

func (*ApiServers) ProtoMessage

func (*ApiServers) ProtoMessage()

func (*ApiServers) ProtoReflect

func (x *ApiServers) ProtoReflect() protoreflect.Message

func (*ApiServers) Reset

func (x *ApiServers) Reset()

func (*ApiServers) String

func (x *ApiServers) String() string

func (*ApiServers) Validate

func (x *ApiServers) Validate() error

type ApiServers_Server

type ApiServers_Server struct {
	Id      uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiServers_Server) Descriptor deprecated

func (*ApiServers_Server) Descriptor() ([]byte, []int)

Deprecated: Use ApiServers_Server.ProtoReflect.Descriptor instead.

func (*ApiServers_Server) GetAddress

func (x *ApiServers_Server) GetAddress() string

func (*ApiServers_Server) GetId

func (x *ApiServers_Server) GetId() uint64

func (*ApiServers_Server) ProtoMessage

func (*ApiServers_Server) ProtoMessage()

func (*ApiServers_Server) ProtoReflect

func (x *ApiServers_Server) ProtoReflect() protoreflect.Message

func (*ApiServers_Server) Reset

func (x *ApiServers_Server) Reset()

func (*ApiServers_Server) String

func (x *ApiServers_Server) String() string

func (*ApiServers_Server) Validate

func (x *ApiServers_Server) Validate() error

type Cluster

type Cluster struct {
	Index          uint64                 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Version        uint64                 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Name           string                 `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	CreatedTime    *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
	Servers        *Servers               `protobuf:"bytes,5,opt,name=servers,proto3" json:"servers,omitempty"`
	Partitions     *Partitions            `protobuf:"bytes,6,opt,name=partitions,proto3" json:"partitions,omitempty"`
	PartitionCount uint32                 `protobuf:"varint,7,opt,name=partition_count,json=partitionCount,proto3" json:"partition_count,omitempty"`
	// contains filtered or unexported fields
}

func (*Cluster) Descriptor deprecated

func (*Cluster) Descriptor() ([]byte, []int)

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetCreatedTime

func (x *Cluster) GetCreatedTime() *timestamppb.Timestamp

func (*Cluster) GetIndex

func (x *Cluster) GetIndex() uint64

func (*Cluster) GetName

func (x *Cluster) GetName() string

func (*Cluster) GetPartitionCount

func (x *Cluster) GetPartitionCount() uint32

func (*Cluster) GetPartitions

func (x *Cluster) GetPartitions() *Partitions

func (*Cluster) GetServers

func (x *Cluster) GetServers() *Servers

func (*Cluster) GetVersion

func (x *Cluster) GetVersion() uint64

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) ProtoReflect

func (x *Cluster) ProtoReflect() protoreflect.Message

func (*Cluster) Reset

func (x *Cluster) Reset()

func (*Cluster) String

func (x *Cluster) String() string

type ClusterInfo

type ClusterInfo struct {
	Cluster         *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
	ControlLeaderId uint64   `protobuf:"varint,2,opt,name=control_leader_id,json=controlLeaderId,proto3" json:"control_leader_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterInfo) Descriptor deprecated

func (*ClusterInfo) Descriptor() ([]byte, []int)

Deprecated: Use ClusterInfo.ProtoReflect.Descriptor instead.

func (*ClusterInfo) GetCluster

func (x *ClusterInfo) GetCluster() *Cluster

func (*ClusterInfo) GetControlLeaderId

func (x *ClusterInfo) GetControlLeaderId() uint64

func (*ClusterInfo) ProtoMessage

func (*ClusterInfo) ProtoMessage()

func (*ClusterInfo) ProtoReflect

func (x *ClusterInfo) ProtoReflect() protoreflect.Message

func (*ClusterInfo) Reset

func (x *ClusterInfo) Reset()

func (*ClusterInfo) String

func (x *ClusterInfo) String() string

type ControlServerStatus

type ControlServerStatus struct {
	// contains filtered or unexported fields
}

func (*ControlServerStatus) Descriptor deprecated

func (*ControlServerStatus) Descriptor() ([]byte, []int)

Deprecated: Use ControlServerStatus.ProtoReflect.Descriptor instead.

func (*ControlServerStatus) ProtoMessage

func (*ControlServerStatus) ProtoMessage()

func (*ControlServerStatus) ProtoReflect

func (x *ControlServerStatus) ProtoReflect() protoreflect.Message

func (*ControlServerStatus) Reset

func (x *ControlServerStatus) Reset()

func (*ControlServerStatus) String

func (x *ControlServerStatus) String() string

func (*ControlServerStatus) Validate

func (x *ControlServerStatus) Validate() error

type DataServerConfig

type DataServerConfig struct {
	ETag       string                                 `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	Partitions map[uint32]*DataServerConfig_Partition `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DataServerConfig) Descriptor deprecated

func (*DataServerConfig) Descriptor() ([]byte, []int)

Deprecated: Use DataServerConfig.ProtoReflect.Descriptor instead.

func (*DataServerConfig) GetETag

func (x *DataServerConfig) GetETag() string

func (*DataServerConfig) GetPartitions

func (x *DataServerConfig) GetPartitions() map[uint32]*DataServerConfig_Partition

func (*DataServerConfig) ProtoMessage

func (*DataServerConfig) ProtoMessage()

func (*DataServerConfig) ProtoReflect

func (x *DataServerConfig) ProtoReflect() protoreflect.Message

func (*DataServerConfig) Reset

func (x *DataServerConfig) Reset()

func (*DataServerConfig) String

func (x *DataServerConfig) String() string

func (*DataServerConfig) Validate

func (x *DataServerConfig) Validate() error

type DataServerConfig_Partition

type DataServerConfig_Partition struct {
	ETag     string                               `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	Id       uint32                               `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Replicas map[string]*DataServerConfig_Replica `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DataServerConfig_Partition) Descriptor deprecated

func (*DataServerConfig_Partition) Descriptor() ([]byte, []int)

Deprecated: Use DataServerConfig_Partition.ProtoReflect.Descriptor instead.

func (*DataServerConfig_Partition) GetETag

func (x *DataServerConfig_Partition) GetETag() string

func (*DataServerConfig_Partition) GetId

func (*DataServerConfig_Partition) GetReplicas

func (*DataServerConfig_Partition) ProtoMessage

func (*DataServerConfig_Partition) ProtoMessage()

func (*DataServerConfig_Partition) ProtoReflect

func (*DataServerConfig_Partition) Reset

func (x *DataServerConfig_Partition) Reset()

func (*DataServerConfig_Partition) String

func (x *DataServerConfig_Partition) String() string

func (*DataServerConfig_Partition) Validate

func (x *DataServerConfig_Partition) Validate() error

type DataServerConfig_Replica

type DataServerConfig_Replica struct {
	Name     string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	ServerId uint64       `protobuf:"varint,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	State    ReplicaState `protobuf:"varint,3,opt,name=state,proto3,enum=control.ReplicaState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*DataServerConfig_Replica) Descriptor deprecated

func (*DataServerConfig_Replica) Descriptor() ([]byte, []int)

Deprecated: Use DataServerConfig_Replica.ProtoReflect.Descriptor instead.

func (*DataServerConfig_Replica) GetName

func (x *DataServerConfig_Replica) GetName() string

func (*DataServerConfig_Replica) GetServerId

func (x *DataServerConfig_Replica) GetServerId() uint64

func (*DataServerConfig_Replica) GetState

func (x *DataServerConfig_Replica) GetState() ReplicaState

func (*DataServerConfig_Replica) ProtoMessage

func (*DataServerConfig_Replica) ProtoMessage()

func (*DataServerConfig_Replica) ProtoReflect

func (x *DataServerConfig_Replica) ProtoReflect() protoreflect.Message

func (*DataServerConfig_Replica) Reset

func (x *DataServerConfig_Replica) Reset()

func (*DataServerConfig_Replica) String

func (x *DataServerConfig_Replica) String() string

func (*DataServerConfig_Replica) Validate

func (x *DataServerConfig_Replica) Validate() error

type DataServerStatus

type DataServerStatus struct {
	Replicas map[uint32]*DataServerStatus_Replica `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DataServerStatus) Descriptor deprecated

func (*DataServerStatus) Descriptor() ([]byte, []int)

Deprecated: Use DataServerStatus.ProtoReflect.Descriptor instead.

func (*DataServerStatus) GetReplicas

func (x *DataServerStatus) GetReplicas() map[uint32]*DataServerStatus_Replica

func (*DataServerStatus) ProtoMessage

func (*DataServerStatus) ProtoMessage()

func (*DataServerStatus) ProtoReflect

func (x *DataServerStatus) ProtoReflect() protoreflect.Message

func (*DataServerStatus) Reset

func (x *DataServerStatus) Reset()

func (*DataServerStatus) String

func (x *DataServerStatus) String() string

func (*DataServerStatus) Validate

func (x *DataServerStatus) Validate() error

type DataServerStatus_Replica

type DataServerStatus_Replica struct {
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IsLeader      bool   `protobuf:"varint,2,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"`
	LeaderTerm    uint64 `protobuf:"varint,3,opt,name=leader_term,json=leaderTerm,proto3" json:"leader_term,omitempty"`
	CommitedIndex uint64 `protobuf:"varint,4,opt,name=commited_index,json=commitedIndex,proto3" json:"commited_index,omitempty"`
	AppliedIndex  uint64 `protobuf:"varint,5,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
	Ready         bool   `protobuf:"varint,6,opt,name=ready,proto3" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

func (*DataServerStatus_Replica) Descriptor deprecated

func (*DataServerStatus_Replica) Descriptor() ([]byte, []int)

Deprecated: Use DataServerStatus_Replica.ProtoReflect.Descriptor instead.

func (*DataServerStatus_Replica) GetAppliedIndex

func (x *DataServerStatus_Replica) GetAppliedIndex() uint64

func (*DataServerStatus_Replica) GetCommitedIndex

func (x *DataServerStatus_Replica) GetCommitedIndex() uint64

func (*DataServerStatus_Replica) GetIsLeader

func (x *DataServerStatus_Replica) GetIsLeader() bool

func (*DataServerStatus_Replica) GetLeaderTerm

func (x *DataServerStatus_Replica) GetLeaderTerm() uint64

func (*DataServerStatus_Replica) GetName

func (x *DataServerStatus_Replica) GetName() string

func (*DataServerStatus_Replica) GetReady

func (x *DataServerStatus_Replica) GetReady() bool

func (*DataServerStatus_Replica) ProtoMessage

func (*DataServerStatus_Replica) ProtoMessage()

func (*DataServerStatus_Replica) ProtoReflect

func (x *DataServerStatus_Replica) ProtoReflect() protoreflect.Message

func (*DataServerStatus_Replica) Reset

func (x *DataServerStatus_Replica) Reset()

func (*DataServerStatus_Replica) String

func (x *DataServerStatus_Replica) String() string

func (*DataServerStatus_Replica) Validate

func (x *DataServerStatus_Replica) Validate() error

type DataServers

type DataServers struct {
	ETag              string                            `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	Servers           map[uint64]*DataServers_Server    `` /* 156-byte string literal not displayed */
	Partitions        map[uint32]*DataServers_Partition `` /* 162-byte string literal not displayed */
	PartitionCount    uint32                            `protobuf:"varint,4,opt,name=partition_count,json=partitionCount,proto3" json:"partition_count,omitempty"`
	ServiceConfigJson string                            `protobuf:"bytes,5,opt,name=service_config_json,json=serviceConfigJson,proto3" json:"service_config_json,omitempty"`
	// contains filtered or unexported fields
}

func (*DataServers) Descriptor deprecated

func (*DataServers) Descriptor() ([]byte, []int)

Deprecated: Use DataServers.ProtoReflect.Descriptor instead.

func (*DataServers) GetETag

func (x *DataServers) GetETag() string

func (*DataServers) GetPartitionCount

func (x *DataServers) GetPartitionCount() uint32

func (*DataServers) GetPartitions

func (x *DataServers) GetPartitions() map[uint32]*DataServers_Partition

func (*DataServers) GetServers

func (x *DataServers) GetServers() map[uint64]*DataServers_Server

func (*DataServers) GetServiceConfigJson

func (x *DataServers) GetServiceConfigJson() string

func (*DataServers) ProtoMessage

func (*DataServers) ProtoMessage()

func (*DataServers) ProtoReflect

func (x *DataServers) ProtoReflect() protoreflect.Message

func (*DataServers) Reset

func (x *DataServers) Reset()

func (*DataServers) String

func (x *DataServers) String() string

func (*DataServers) Validate

func (x *DataServers) Validate() error

type DataServers_Partition

type DataServers_Partition struct {
	ETag             string   `protobuf:"bytes,1,opt,name=e_tag,json=eTag,proto3" json:"e_tag,omitempty"`
	Id               uint32   `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	LeaderServerId   uint64   `protobuf:"varint,3,opt,name=leader_server_id,json=leaderServerId,proto3" json:"leader_server_id,omitempty"`
	ReplicaServerIds []uint64 `protobuf:"varint,4,rep,packed,name=replica_server_ids,json=replicaServerIds,proto3" json:"replica_server_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*DataServers_Partition) Descriptor deprecated

func (*DataServers_Partition) Descriptor() ([]byte, []int)

Deprecated: Use DataServers_Partition.ProtoReflect.Descriptor instead.

func (*DataServers_Partition) GetETag

func (x *DataServers_Partition) GetETag() string

func (*DataServers_Partition) GetId

func (x *DataServers_Partition) GetId() uint32

func (*DataServers_Partition) GetLeaderServerId

func (x *DataServers_Partition) GetLeaderServerId() uint64

func (*DataServers_Partition) GetReplicaServerIds

func (x *DataServers_Partition) GetReplicaServerIds() []uint64

func (*DataServers_Partition) ProtoMessage

func (*DataServers_Partition) ProtoMessage()

func (*DataServers_Partition) ProtoReflect

func (x *DataServers_Partition) ProtoReflect() protoreflect.Message

func (*DataServers_Partition) Reset

func (x *DataServers_Partition) Reset()

func (*DataServers_Partition) String

func (x *DataServers_Partition) String() string

func (*DataServers_Partition) Validate

func (x *DataServers_Partition) Validate() error

type DataServers_Server

type DataServers_Server struct {
	Id      uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*DataServers_Server) Descriptor deprecated

func (*DataServers_Server) Descriptor() ([]byte, []int)

Deprecated: Use DataServers_Server.ProtoReflect.Descriptor instead.

func (*DataServers_Server) GetAddress

func (x *DataServers_Server) GetAddress() string

func (*DataServers_Server) GetId

func (x *DataServers_Server) GetId() uint64

func (*DataServers_Server) ProtoMessage

func (*DataServers_Server) ProtoMessage()

func (*DataServers_Server) ProtoReflect

func (x *DataServers_Server) ProtoReflect() protoreflect.Message

func (*DataServers_Server) Reset

func (x *DataServers_Server) Reset()

func (*DataServers_Server) String

func (x *DataServers_Server) String() string

func (*DataServers_Server) Validate

func (x *DataServers_Server) Validate() error

type DiscoverResponse

type DiscoverResponse struct {
	Servers           []*DiscoverResponse_Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
	ServiceConfigJson string                     `protobuf:"bytes,2,opt,name=service_config_json,json=serviceConfigJson,proto3" json:"service_config_json,omitempty"`
	// contains filtered or unexported fields
}

func (*DiscoverResponse) Descriptor deprecated

func (*DiscoverResponse) Descriptor() ([]byte, []int)

Deprecated: Use DiscoverResponse.ProtoReflect.Descriptor instead.

func (*DiscoverResponse) GetServers

func (x *DiscoverResponse) GetServers() []*DiscoverResponse_Server

func (*DiscoverResponse) GetServiceConfigJson

func (x *DiscoverResponse) GetServiceConfigJson() string

func (*DiscoverResponse) ProtoMessage

func (*DiscoverResponse) ProtoMessage()

func (*DiscoverResponse) ProtoReflect

func (x *DiscoverResponse) ProtoReflect() protoreflect.Message

func (*DiscoverResponse) Reset

func (x *DiscoverResponse) Reset()

func (*DiscoverResponse) String

func (x *DiscoverResponse) String() string

func (*DiscoverResponse) Validate

func (x *DiscoverResponse) Validate() error

type DiscoverResponse_Server

type DiscoverResponse_Server struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Leader  bool   `protobuf:"varint,2,opt,name=leader,proto3" json:"leader,omitempty"`
	// contains filtered or unexported fields
}

func (*DiscoverResponse_Server) Descriptor deprecated

func (*DiscoverResponse_Server) Descriptor() ([]byte, []int)

Deprecated: Use DiscoverResponse_Server.ProtoReflect.Descriptor instead.

func (*DiscoverResponse_Server) GetAddress

func (x *DiscoverResponse_Server) GetAddress() string

func (*DiscoverResponse_Server) GetLeader

func (x *DiscoverResponse_Server) GetLeader() bool

func (*DiscoverResponse_Server) ProtoMessage

func (*DiscoverResponse_Server) ProtoMessage()

func (*DiscoverResponse_Server) ProtoReflect

func (x *DiscoverResponse_Server) ProtoReflect() protoreflect.Message

func (*DiscoverResponse_Server) Reset

func (x *DiscoverResponse_Server) Reset()

func (*DiscoverResponse_Server) String

func (x *DiscoverResponse_Server) String() string

type GetApiServers

type GetApiServers struct {
	IfNoMatch string `protobuf:"bytes,1,opt,name=if_no_match,json=ifNoMatch,proto3" json:"if_no_match,omitempty"`
	// contains filtered or unexported fields
}

func (*GetApiServers) Descriptor deprecated

func (*GetApiServers) Descriptor() ([]byte, []int)

Deprecated: Use GetApiServers.ProtoReflect.Descriptor instead.

func (*GetApiServers) GetIfNoMatch

func (x *GetApiServers) GetIfNoMatch() string

func (*GetApiServers) ProtoMessage

func (*GetApiServers) ProtoMessage()

func (*GetApiServers) ProtoReflect

func (x *GetApiServers) ProtoReflect() protoreflect.Message

func (*GetApiServers) Reset

func (x *GetApiServers) Reset()

func (*GetApiServers) String

func (x *GetApiServers) String() string

func (*GetApiServers) Validate

func (x *GetApiServers) Validate() error

type GetDataServers

type GetDataServers struct {
	IfNoMatch string `protobuf:"bytes,1,opt,name=if_no_match,json=ifNoMatch,proto3" json:"if_no_match,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDataServers) Descriptor deprecated

func (*GetDataServers) Descriptor() ([]byte, []int)

Deprecated: Use GetDataServers.ProtoReflect.Descriptor instead.

func (*GetDataServers) GetIfNoMatch

func (x *GetDataServers) GetIfNoMatch() string

func (*GetDataServers) ProtoMessage

func (*GetDataServers) ProtoMessage()

func (*GetDataServers) ProtoReflect

func (x *GetDataServers) ProtoReflect() protoreflect.Message

func (*GetDataServers) Reset

func (x *GetDataServers) Reset()

func (*GetDataServers) String

func (x *GetDataServers) String() string

func (*GetDataServers) Validate

func (x *GetDataServers) Validate() error

type Heartbeat

type Heartbeat struct {
	ConfigETag string `protobuf:"bytes,1,opt,name=config_e_tag,json=configETag,proto3" json:"config_e_tag,omitempty"`
	// Types that are assignable to Status:
	//
	//	*Heartbeat_ControlServerStatus
	//	*Heartbeat_DataServerStatus
	//	*Heartbeat_ApiServerStatus
	Status isHeartbeat_Status `protobuf_oneof:"status"`
	// contains filtered or unexported fields
}

func (*Heartbeat) Descriptor deprecated

func (*Heartbeat) Descriptor() ([]byte, []int)

Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead.

func (*Heartbeat) GetApiServerStatus

func (x *Heartbeat) GetApiServerStatus() *ApiServerStatus

func (*Heartbeat) GetConfigETag

func (x *Heartbeat) GetConfigETag() string

func (*Heartbeat) GetControlServerStatus

func (x *Heartbeat) GetControlServerStatus() *ControlServerStatus

func (*Heartbeat) GetDataServerStatus

func (x *Heartbeat) GetDataServerStatus() *DataServerStatus

func (*Heartbeat) GetStatus

func (m *Heartbeat) GetStatus() isHeartbeat_Status

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) ProtoReflect

func (x *Heartbeat) ProtoReflect() protoreflect.Message

func (*Heartbeat) Reset

func (x *Heartbeat) Reset()

func (*Heartbeat) String

func (x *Heartbeat) String() string

func (*Heartbeat) Validate

func (x *Heartbeat) Validate() error

type Heartbeat_ApiServerStatus

type Heartbeat_ApiServerStatus struct {
	ApiServerStatus *ApiServerStatus `protobuf:"bytes,4,opt,name=api_server_status,json=apiServerStatus,proto3,oneof"`
}

type Heartbeat_ControlServerStatus

type Heartbeat_ControlServerStatus struct {
	ControlServerStatus *ControlServerStatus `protobuf:"bytes,2,opt,name=control_server_status,json=controlServerStatus,proto3,oneof"`
}

type Heartbeat_DataServerStatus

type Heartbeat_DataServerStatus struct {
	DataServerStatus *DataServerStatus `protobuf:"bytes,3,opt,name=data_server_status,json=dataServerStatus,proto3,oneof"`
}

type HelloRequest

type HelloRequest struct {
	ServerId uint64 `protobuf:"varint,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

func (*HelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetAddress

func (x *HelloRequest) GetAddress() string

func (*HelloRequest) GetServerId

func (x *HelloRequest) GetServerId() uint64

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

func (x *HelloRequest) ProtoReflect() protoreflect.Message

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

func (*HelloRequest) Validate

func (x *HelloRequest) Validate() error

type HelloResponse

type HelloResponse struct {
	HlcTimestamp uint64 `protobuf:"varint,1,opt,name=hlc_timestamp,json=hlcTimestamp,proto3" json:"hlc_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloResponse) Descriptor deprecated

func (*HelloResponse) Descriptor() ([]byte, []int)

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetHlcTimestamp

func (x *HelloResponse) GetHlcTimestamp() uint64

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

func (x *HelloResponse) ProtoReflect() protoreflect.Message

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

func (*HelloResponse) Validate

func (x *HelloResponse) Validate() error

type Partition

type Partition struct {
	Id                 uint32                        `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Replicas           map[string]*Partition_Replica `` /* 157-byte string literal not displayed */
	LastReplicaId      uint64                        `protobuf:"varint,3,opt,name=last_replica_id,json=lastReplicaId,proto3" json:"last_replica_id,omitempty"`
	AssignmentsVersion uint64                        `protobuf:"varint,4,opt,name=assignments_version,json=assignmentsVersion,proto3" json:"assignments_version,omitempty"`
	Leader             string                        `protobuf:"bytes,5,opt,name=leader,proto3" json:"leader,omitempty"`
	LeaderTerm         uint64                        `protobuf:"varint,6,opt,name=leader_term,json=leaderTerm,proto3" json:"leader_term,omitempty"`
	LeaderAppliedIndex uint64                        `protobuf:"varint,7,opt,name=leader_applied_index,json=leaderAppliedIndex,proto3" json:"leader_applied_index,omitempty"`
	CommitedIndex      uint64                        `protobuf:"varint,8,opt,name=commited_index,json=commitedIndex,proto3" json:"commited_index,omitempty"`
	// contains filtered or unexported fields
}

Partition represents a data storage partition which has a one-to-one mapping to a Raft replication group. Each partition contains a set of replicas and thir placement to servers. Each replica corresponds to one Raft group member.

func (*Partition) Descriptor deprecated

func (*Partition) Descriptor() ([]byte, []int)

Deprecated: Use Partition.ProtoReflect.Descriptor instead.

func (*Partition) GetAssignmentsVersion

func (x *Partition) GetAssignmentsVersion() uint64

func (*Partition) GetCommitedIndex

func (x *Partition) GetCommitedIndex() uint64

func (*Partition) GetId

func (x *Partition) GetId() uint32

func (*Partition) GetLastReplicaId

func (x *Partition) GetLastReplicaId() uint64

func (*Partition) GetLeader

func (x *Partition) GetLeader() string

func (*Partition) GetLeaderAppliedIndex

func (x *Partition) GetLeaderAppliedIndex() uint64

func (*Partition) GetLeaderTerm

func (x *Partition) GetLeaderTerm() uint64

func (*Partition) GetReplicas

func (x *Partition) GetReplicas() map[string]*Partition_Replica

func (*Partition) ProtoMessage

func (*Partition) ProtoMessage()

func (*Partition) ProtoReflect

func (x *Partition) ProtoReflect() protoreflect.Message

func (*Partition) ReplicaCountForState

func (p *Partition) ReplicaCountForState(state ReplicaState) int

func (*Partition) ReplicaForServer

func (p *Partition) ReplicaForServer(serverID uint64) *Partition_Replica

func (*Partition) Reset

func (x *Partition) Reset()

func (*Partition) ServingReplicaCount

func (p *Partition) ServingReplicaCount() int

func (*Partition) String

func (x *Partition) String() string

type Partition_Replica

type Partition_Replica struct {
	Name                string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	ServerId            uint64                 `protobuf:"varint,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	State               ReplicaState           `protobuf:"varint,3,opt,name=state,proto3,enum=control.ReplicaState" json:"state,omitempty"`
	CreatedTime         *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
	StateTransitionTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=state_transition_time,json=stateTransitionTime,proto3" json:"state_transition_time,omitempty"`
	LastUpdate          *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
	AppliedIndex        uint64                 `protobuf:"varint,7,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
	Ready               bool                   `protobuf:"varint,8,opt,name=ready,proto3" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

func (*Partition_Replica) Descriptor deprecated

func (*Partition_Replica) Descriptor() ([]byte, []int)

Deprecated: Use Partition_Replica.ProtoReflect.Descriptor instead.

func (*Partition_Replica) GetAppliedIndex

func (x *Partition_Replica) GetAppliedIndex() uint64

func (*Partition_Replica) GetCreatedTime

func (x *Partition_Replica) GetCreatedTime() *timestamppb.Timestamp

func (*Partition_Replica) GetLastUpdate

func (x *Partition_Replica) GetLastUpdate() *timestamppb.Timestamp

func (*Partition_Replica) GetName

func (x *Partition_Replica) GetName() string

func (*Partition_Replica) GetReady

func (x *Partition_Replica) GetReady() bool

func (*Partition_Replica) GetServerId

func (x *Partition_Replica) GetServerId() uint64

func (*Partition_Replica) GetState

func (x *Partition_Replica) GetState() ReplicaState

func (*Partition_Replica) GetStateTransitionTime

func (x *Partition_Replica) GetStateTransitionTime() *timestamppb.Timestamp

func (*Partition_Replica) ProtoMessage

func (*Partition_Replica) ProtoMessage()

func (*Partition_Replica) ProtoReflect

func (x *Partition_Replica) ProtoReflect() protoreflect.Message

func (*Partition_Replica) Reset

func (x *Partition_Replica) Reset()

func (*Partition_Replica) String

func (x *Partition_Replica) String() string

type Partitions

type Partitions struct {
	Version            uint64                `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	AssignmentsVersion uint64                `protobuf:"varint,2,opt,name=assignments_version,json=assignmentsVersion,proto3" json:"assignments_version,omitempty"`
	Items              map[uint32]*Partition `` /* 152-byte string literal not displayed */
	MaxImbalance       uint32                `protobuf:"varint,4,opt,name=max_imbalance,json=maxImbalance,proto3" json:"max_imbalance,omitempty"`
	// contains filtered or unexported fields
}

func (*Partitions) Descriptor deprecated

func (*Partitions) Descriptor() ([]byte, []int)

Deprecated: Use Partitions.ProtoReflect.Descriptor instead.

func (*Partitions) GetAssignmentsVersion

func (x *Partitions) GetAssignmentsVersion() uint64

func (*Partitions) GetItems

func (x *Partitions) GetItems() map[uint32]*Partition

func (*Partitions) GetMaxImbalance

func (x *Partitions) GetMaxImbalance() uint32

func (*Partitions) GetVersion

func (x *Partitions) GetVersion() uint64

func (*Partitions) HasAssignments

func (p *Partitions) HasAssignments() bool

func (*Partitions) ProtoMessage

func (*Partitions) ProtoMessage()

func (*Partitions) ProtoReflect

func (x *Partitions) ProtoReflect() protoreflect.Message

func (*Partitions) ReplicaCount

func (p *Partitions) ReplicaCount() int

func (*Partitions) ReplicaCountForState

func (p *Partitions) ReplicaCountForState(state ReplicaState) int

func (*Partitions) Reset

func (x *Partitions) Reset()

func (*Partitions) ServingReplicaCount

func (p *Partitions) ServingReplicaCount() int

func (*Partitions) String

func (x *Partitions) String() string

type RegisterRequest

type RegisterRequest struct {

	// Unique token to mitigate failure scenarios where
	// the same server registers itself multiple times,
	// like in crash-restart loop cases. Could act as
	// auth token in the future.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// The addres where the server will be contacted.
	Address string     `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Type    ServerType `protobuf:"varint,3,opt,name=type,proto3,enum=control.ServerType" json:"type,omitempty"`
	Tags    []string   `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAddress

func (x *RegisterRequest) GetAddress() string

func (*RegisterRequest) GetTags

func (x *RegisterRequest) GetTags() []string

func (*RegisterRequest) GetToken

func (x *RegisterRequest) GetToken() string

func (*RegisterRequest) GetType

func (x *RegisterRequest) GetType() ServerType

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

func (x *RegisterRequest) ProtoReflect() protoreflect.Message

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

func (*RegisterRequest) Validate

func (x *RegisterRequest) Validate() error

type RegisterResponse

type RegisterResponse struct {

	// Unique identifier that the server will store on disk.
	// All further interactions between this server and the
	// control plane must include it.
	ServerId uint64 `protobuf:"varint,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// Equivalent to the id above. It can be used in places
	// where strings are expected. Servers are required to
	// store both id and name pair and do the translation
	// between the two on their own.
	ServerName string `protobuf:"bytes,2,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

func (*RegisterResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetServerId

func (x *RegisterResponse) GetServerId() uint64

func (*RegisterResponse) GetServerName

func (x *RegisterResponse) GetServerName() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

func (x *RegisterResponse) ProtoReflect() protoreflect.Message

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

func (*RegisterResponse) Validate

func (x *RegisterResponse) Validate() error

type ReplicaState

type ReplicaState int32
const (
	ReplicaState_Stopped  ReplicaState = 0
	ReplicaState_Joining  ReplicaState = 1
	ReplicaState_Voter    ReplicaState = 2
	ReplicaState_NonVoter ReplicaState = 3
	ReplicaState_Leaving  ReplicaState = 4
)

func (ReplicaState) Descriptor

func (ReplicaState) Enum

func (x ReplicaState) Enum() *ReplicaState

func (ReplicaState) EnumDescriptor deprecated

func (ReplicaState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReplicaState.Descriptor instead.

func (ReplicaState) IsServing

func (s ReplicaState) IsServing() bool

func (ReplicaState) Number

func (ReplicaState) String

func (x ReplicaState) String() string

func (ReplicaState) Type

type Server

type Server struct {
	Id           uint64                 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type         ServerType             `protobuf:"varint,3,opt,name=type,proto3,enum=control.ServerType" json:"type,omitempty"`
	Tags         []string               `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	RegisteredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=registered_at,json=registeredAt,proto3" json:"registered_at,omitempty"`
	LastSeen     *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
	LastAddress  string                 `protobuf:"bytes,7,opt,name=last_address,json=lastAddress,proto3" json:"last_address,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

func (*Server) Descriptor() ([]byte, []int)

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetId

func (x *Server) GetId() uint64

func (*Server) GetLastAddress

func (x *Server) GetLastAddress() string

func (*Server) GetLastSeen

func (x *Server) GetLastSeen() *timestamppb.Timestamp

func (*Server) GetName

func (x *Server) GetName() string

func (*Server) GetRegisteredAt

func (x *Server) GetRegisteredAt() *timestamppb.Timestamp

func (*Server) GetTags

func (x *Server) GetTags() []string

func (*Server) GetType

func (x *Server) GetType() ServerType

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

func (x *Server) ProtoReflect() protoreflect.Message

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type ServerType

type ServerType int32
const (
	ServerType_Unknown ServerType = 0
	ServerType_Control ServerType = 1
	ServerType_Data    ServerType = 2
	ServerType_Api     ServerType = 3
)

func (ServerType) Descriptor

func (ServerType) Descriptor() protoreflect.EnumDescriptor

func (ServerType) Enum

func (x ServerType) Enum() *ServerType

func (ServerType) EnumDescriptor deprecated

func (ServerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServerType.Descriptor instead.

func (ServerType) Number

func (x ServerType) Number() protoreflect.EnumNumber

func (ServerType) String

func (x ServerType) String() string

func (ServerType) Type

type Servers

type Servers struct {
	Version         uint64             `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	RegisterVersion uint64             `protobuf:"varint,2,opt,name=register_version,json=registerVersion,proto3" json:"register_version,omitempty"`
	Items           map[uint64]*Server `` /* 152-byte string literal not displayed */
	LastId          uint64             `protobuf:"varint,4,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
	Tokens          map[string]uint64  `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Servers) ApiServers

func (s *Servers) ApiServers() map[uint64]*Server

func (*Servers) ControlServers

func (s *Servers) ControlServers() map[uint64]*Server

func (*Servers) CountForType

func (s *Servers) CountForType(stype ServerType) int

func (*Servers) DataServers

func (s *Servers) DataServers() map[uint64]*Server

func (*Servers) Descriptor deprecated

func (*Servers) Descriptor() ([]byte, []int)

Deprecated: Use Servers.ProtoReflect.Descriptor instead.

func (*Servers) ForName

func (s *Servers) ForName(name string) *Server

func (*Servers) ForType

func (s *Servers) ForType(stype ServerType) map[uint64]*Server

func (*Servers) GetItems

func (x *Servers) GetItems() map[uint64]*Server

func (*Servers) GetLastId

func (x *Servers) GetLastId() uint64

func (*Servers) GetRegisterVersion

func (x *Servers) GetRegisterVersion() uint64

func (*Servers) GetTokens

func (x *Servers) GetTokens() map[string]uint64

func (*Servers) GetVersion

func (x *Servers) GetVersion() uint64

func (*Servers) ProtoMessage

func (*Servers) ProtoMessage()

func (*Servers) ProtoReflect

func (x *Servers) ProtoReflect() protoreflect.Message

func (*Servers) Reset

func (x *Servers) Reset()

func (*Servers) String

func (x *Servers) String() string

type ServiceClient

type ServiceClient interface {
	// Discover is used early by clients to discover the control
	// plane cluster servers and it is the only method that can be
	// invoked both on leader and followers. All the other methods
	// below must be invoked on the control plane leader.
	Discover(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DiscoverResponse, error)
	// Register adds a new server to the control or data planes.
	// It is the first operation performed by all new servers.
	// Once registered, a Control plane server is added to the
	// control plane Raft group and will receive replicated state
	// from the leader. For Data and API servers, they need to start
	// a new session to receive configuration and tasks.
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	// NewSession starts a new long-lived session between a data
	// plane server and the control plane. It is the main
	// way for servers to advertise their presence/liveness status
	// and to receive configuration updates and tasks from the
	// control plane. A server must first register itself before
	// starting a new session.
	NewSession(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SessionIn, SessionOut], error)
	// GetClusterInfo returns the current cluster info.
	GetClusterInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterInfo, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Service represents the control plane service.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Discover is used early by clients to discover the control
	// plane cluster servers and it is the only method that can be
	// invoked both on leader and followers. All the other methods
	// below must be invoked on the control plane leader.
	Discover(context.Context, *emptypb.Empty) (*DiscoverResponse, error)
	// Register adds a new server to the control or data planes.
	// It is the first operation performed by all new servers.
	// Once registered, a Control plane server is added to the
	// control plane Raft group and will receive replicated state
	// from the leader. For Data and API servers, they need to start
	// a new session to receive configuration and tasks.
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// NewSession starts a new long-lived session between a data
	// plane server and the control plane. It is the main
	// way for servers to advertise their presence/liveness status
	// and to receive configuration updates and tasks from the
	// control plane. A server must first register itself before
	// starting a new session.
	NewSession(grpc.BidiStreamingServer[SessionIn, SessionOut]) error
	// GetClusterInfo returns the current cluster info.
	GetClusterInfo(context.Context, *emptypb.Empty) (*ClusterInfo, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility.

Service represents the control plane service.

type Service_NewSessionClient

type Service_NewSessionClient = grpc.BidiStreamingClient[SessionIn, SessionOut]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Service_NewSessionServer

type Service_NewSessionServer = grpc.BidiStreamingServer[SessionIn, SessionOut]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SessionIn

type SessionIn struct {

	// Types that are assignable to Payload:
	//
	//	*SessionIn_Hello
	//	*SessionIn_Heartbeat
	//	*SessionIn_GetDataServers
	//	*SessionIn_GetApiServers
	//	*SessionIn_TimestampResponse
	Payload isSessionIn_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*SessionIn) Descriptor deprecated

func (*SessionIn) Descriptor() ([]byte, []int)

Deprecated: Use SessionIn.ProtoReflect.Descriptor instead.

func (*SessionIn) GetGetApiServers

func (x *SessionIn) GetGetApiServers() *GetApiServers

func (*SessionIn) GetGetDataServers

func (x *SessionIn) GetGetDataServers() *GetDataServers

func (*SessionIn) GetHeartbeat

func (x *SessionIn) GetHeartbeat() *Heartbeat

func (*SessionIn) GetHello

func (x *SessionIn) GetHello() *HelloRequest

func (*SessionIn) GetPayload

func (m *SessionIn) GetPayload() isSessionIn_Payload

func (*SessionIn) GetTimestampResponse

func (x *SessionIn) GetTimestampResponse() *TimestampResponse

func (*SessionIn) ProtoMessage

func (*SessionIn) ProtoMessage()

func (*SessionIn) ProtoReflect

func (x *SessionIn) ProtoReflect() protoreflect.Message

func (*SessionIn) Reset

func (x *SessionIn) Reset()

func (*SessionIn) String

func (x *SessionIn) String() string

func (*SessionIn) Validate

func (x *SessionIn) Validate() error

type SessionIn_GetApiServers

type SessionIn_GetApiServers struct {
	GetApiServers *GetApiServers `protobuf:"bytes,4,opt,name=get_api_servers,json=getApiServers,proto3,oneof"`
}

type SessionIn_GetDataServers

type SessionIn_GetDataServers struct {
	GetDataServers *GetDataServers `protobuf:"bytes,3,opt,name=get_data_servers,json=getDataServers,proto3,oneof"`
}

type SessionIn_Heartbeat

type SessionIn_Heartbeat struct {
	Heartbeat *Heartbeat `protobuf:"bytes,2,opt,name=heartbeat,proto3,oneof"`
}

type SessionIn_Hello

type SessionIn_Hello struct {
	Hello *HelloRequest `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}

type SessionIn_TimestampResponse

type SessionIn_TimestampResponse struct {
	TimestampResponse *TimestampResponse `protobuf:"bytes,5,opt,name=timestamp_response,json=timestampResponse,proto3,oneof"`
}

type SessionOut

type SessionOut struct {

	// Types that are assignable to Payload:
	//
	//	*SessionOut_Hello
	//	*SessionOut_DataServerConfig
	//	*SessionOut_ApiServerConfig
	//	*SessionOut_DataServers
	//	*SessionOut_ApiServers
	//	*SessionOut_TimestampRequest
	Payload isSessionOut_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*SessionOut) Descriptor deprecated

func (*SessionOut) Descriptor() ([]byte, []int)

Deprecated: Use SessionOut.ProtoReflect.Descriptor instead.

func (*SessionOut) GetApiServerConfig

func (x *SessionOut) GetApiServerConfig() *ApiServerConfig

func (*SessionOut) GetApiServers

func (x *SessionOut) GetApiServers() *ApiServers

func (*SessionOut) GetDataServerConfig

func (x *SessionOut) GetDataServerConfig() *DataServerConfig

func (*SessionOut) GetDataServers

func (x *SessionOut) GetDataServers() *DataServers

func (*SessionOut) GetHello

func (x *SessionOut) GetHello() *HelloResponse

func (*SessionOut) GetPayload

func (m *SessionOut) GetPayload() isSessionOut_Payload

func (*SessionOut) GetTimestampRequest

func (x *SessionOut) GetTimestampRequest() *TimestampRequest

func (*SessionOut) ProtoMessage

func (*SessionOut) ProtoMessage()

func (*SessionOut) ProtoReflect

func (x *SessionOut) ProtoReflect() protoreflect.Message

func (*SessionOut) Reset

func (x *SessionOut) Reset()

func (*SessionOut) String

func (x *SessionOut) String() string

func (*SessionOut) Validate

func (x *SessionOut) Validate() error

type SessionOut_ApiServerConfig

type SessionOut_ApiServerConfig struct {
	ApiServerConfig *ApiServerConfig `protobuf:"bytes,3,opt,name=api_server_config,json=apiServerConfig,proto3,oneof"`
}

type SessionOut_ApiServers

type SessionOut_ApiServers struct {
	ApiServers *ApiServers `protobuf:"bytes,5,opt,name=api_servers,json=apiServers,proto3,oneof"`
}

type SessionOut_DataServerConfig

type SessionOut_DataServerConfig struct {
	DataServerConfig *DataServerConfig `protobuf:"bytes,2,opt,name=data_server_config,json=dataServerConfig,proto3,oneof"`
}

type SessionOut_DataServers

type SessionOut_DataServers struct {
	DataServers *DataServers `protobuf:"bytes,4,opt,name=data_servers,json=dataServers,proto3,oneof"`
}

type SessionOut_Hello

type SessionOut_Hello struct {
	Hello *HelloResponse `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}

type SessionOut_TimestampRequest

type SessionOut_TimestampRequest struct {
	TimestampRequest *TimestampRequest `protobuf:"bytes,6,opt,name=timestamp_request,json=timestampRequest,proto3,oneof"`
}

type TimestampRequest

type TimestampRequest struct {
	RequestTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=request_timestamp,json=requestTimestamp,proto3" json:"request_timestamp,omitempty"`
	// contains filtered or unexported fields
}

TimestampRequest and TimestampResponse are used to determine the wall clock offset between servers. The exchange is initiated by the control plane and works in a similar way as the ICMP Timestamp control message, but with the asumption that receive/t2 and transmit/t3 timestamps are the same. The offset is computed using the NTP clock synchronization algorithm formula: θ = 1/2 * [(t2 − t1) + (t3 − t4)], where t2==t3.

func (*TimestampRequest) Descriptor deprecated

func (*TimestampRequest) Descriptor() ([]byte, []int)

Deprecated: Use TimestampRequest.ProtoReflect.Descriptor instead.

func (*TimestampRequest) GetRequestTimestamp

func (x *TimestampRequest) GetRequestTimestamp() *timestamppb.Timestamp

func (*TimestampRequest) ProtoMessage

func (*TimestampRequest) ProtoMessage()

func (*TimestampRequest) ProtoReflect

func (x *TimestampRequest) ProtoReflect() protoreflect.Message

func (*TimestampRequest) Reset

func (x *TimestampRequest) Reset()

func (*TimestampRequest) String

func (x *TimestampRequest) String() string

func (*TimestampRequest) Validate

func (x *TimestampRequest) Validate() error

type TimestampResponse

type TimestampResponse struct {
	RequestTimestamp  *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=request_timestamp,json=requestTimestamp,proto3" json:"request_timestamp,omitempty"`
	ResponseTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=response_timestamp,json=responseTimestamp,proto3" json:"response_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*TimestampResponse) Descriptor deprecated

func (*TimestampResponse) Descriptor() ([]byte, []int)

Deprecated: Use TimestampResponse.ProtoReflect.Descriptor instead.

func (*TimestampResponse) GetRequestTimestamp

func (x *TimestampResponse) GetRequestTimestamp() *timestamppb.Timestamp

func (*TimestampResponse) GetResponseTimestamp

func (x *TimestampResponse) GetResponseTimestamp() *timestamppb.Timestamp

func (*TimestampResponse) ProtoMessage

func (*TimestampResponse) ProtoMessage()

func (*TimestampResponse) ProtoReflect

func (x *TimestampResponse) ProtoReflect() protoreflect.Message

func (*TimestampResponse) Reset

func (x *TimestampResponse) Reset()

func (*TimestampResponse) String

func (x *TimestampResponse) String() string

func (*TimestampResponse) Validate

func (x *TimestampResponse) Validate() error

type UnimplementedServiceServer

type UnimplementedServiceServer struct{}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedServiceServer) Discover

func (UnimplementedServiceServer) GetClusterInfo

func (UnimplementedServiceServer) NewSession

func (UnimplementedServiceServer) Register

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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