logservice

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// NoLeader is the replica ID of the leader node.
	NoLeader uint64 = 0
	// HeaderSize is the size of the header for each logservice and
	// hakeeper command.
	HeaderSize = 4
)

Variables

View Source
var (
	ErrInvalidLengthLogservice        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLogservice          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLogservice = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ConfigChangeType_name = map[int32]string{
	0: "AddReplica",
	1: "RemoveReplica",
	2: "StartReplica",
	3: "StopReplica",
}
View Source
var ConfigChangeType_value = map[string]int32{
	"AddReplica":    0,
	"RemoveReplica": 1,
	"StartReplica":  2,
	"StopReplica":   3,
}
View Source
var ErrorCode_name = map[int32]string{
	0:    "NoError",
	1:    "Timeout",
	2:    "Canceled",
	3:    "InvalidShard",
	4:    "InvalidTimeout",
	5:    "InvalidPayload",
	6:    "InvalidPayloadSize",
	7:    "Rejected",
	8:    "ShardNotReady",
	9:    "SystemClosed",
	100:  "LsnAlreadyTruncated",
	101:  "OutOfRange",
	102:  "NotLeaseHolder",
	1000: "OtherSystemError",
}
View Source
var ErrorCode_value = map[string]int32{
	"NoError":             0,
	"Timeout":             1,
	"Canceled":            2,
	"InvalidShard":        3,
	"InvalidTimeout":      4,
	"InvalidPayload":      5,
	"InvalidPayloadSize":  6,
	"Rejected":            7,
	"ShardNotReady":       8,
	"SystemClosed":        9,
	"LsnAlreadyTruncated": 100,
	"OutOfRange":          101,
	"NotLeaseHolder":      102,
	"OtherSystemError":    1000,
}
View Source
var HAKeeperState_name = map[int32]string{
	0: "HAKeeperCreated",
	1: "HAKeeperBootstrapping",
	2: "HAKeeperBootstrapCommandsReceived",
	3: "HAKeeperBootstrapFailed",
	4: "HAKeeperRunning",
}
View Source
var HAKeeperState_value = map[string]int32{
	"HAKeeperCreated":                   0,
	"HAKeeperBootstrapping":             1,
	"HAKeeperBootstrapCommandsReceived": 2,
	"HAKeeperBootstrapFailed":           3,
	"HAKeeperRunning":                   4,
}
View Source
var HAKeeperUpdateType_name = map[int32]string{
	0: "TickUpdate",
	1: "CNHeartbeatUpdate",
	2: "DNHeartbeatUpdate",
	3: "LogHeartbeatUpdate",
	4: "GetIDUpdate",
	5: "ScheduleCommandUpdate",
	6: "SetStateUpdate",
	7: "InitialClusterUpdate",
}
View Source
var HAKeeperUpdateType_value = map[string]int32{
	"TickUpdate":            0,
	"CNHeartbeatUpdate":     1,
	"DNHeartbeatUpdate":     2,
	"LogHeartbeatUpdate":    3,
	"GetIDUpdate":           4,
	"ScheduleCommandUpdate": 5,
	"SetStateUpdate":        6,
	"InitialClusterUpdate":  7,
}
View Source
var MethodType_name = map[int32]string{
	0:  "TSO_UPDATE",
	1:  "APPEND",
	2:  "READ",
	3:  "TRUNCATE",
	4:  "GET_TRUNCATE",
	5:  "CONNECT",
	6:  "CONNECT_RO",
	7:  "LOG_HEARTBEAT",
	8:  "CN_HEARTBEAT",
	9:  "DN_HEARTBEAT",
	10: "CHECK_HAKEEPER",
	11: "GET_CLUSTER_DETAILS",
}
View Source
var MethodType_value = map[string]int32{
	"TSO_UPDATE":          0,
	"APPEND":              1,
	"READ":                2,
	"TRUNCATE":            3,
	"GET_TRUNCATE":        4,
	"CONNECT":             5,
	"CONNECT_RO":          6,
	"LOG_HEARTBEAT":       7,
	"CN_HEARTBEAT":        8,
	"DN_HEARTBEAT":        9,
	"CHECK_HAKEEPER":      10,
	"GET_CLUSTER_DETAILS": 11,
}
View Source
var RecordType_name = map[int32]string{
	0: "UserRecord",
	1: "Internal",
	2: "LeaseUpdate",
	3: "LeaseRejected",
}
View Source
var RecordType_value = map[string]int32{
	"UserRecord":    0,
	"Internal":      1,
	"LeaseUpdate":   2,
	"LeaseRejected": 3,
}
View Source
var ServiceType_name = map[int32]string{
	0: "LogService",
	1: "DnService",
}
View Source
var ServiceType_value = map[string]int32{
	"LogService": 0,
	"DnService":  1,
}
View Source
var UpdateType_name = map[int32]string{
	0: "LeaseHolderIDUpdate",
	1: "TruncateLSNUpdate",
	2: "UserEntryUpdate",
	3: "TSOUpdate",
}
View Source
var UpdateType_value = map[string]int32{
	"LeaseHolderIDUpdate": 0,
	"TruncateLSNUpdate":   1,
	"UserEntryUpdate":     2,
	"TSOUpdate":           3,
}

Functions

This section is empty.

Types

type CNNode added in v0.5.1

type CNNode struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ServiceAddress       string   `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	Tick                 uint64   `protobuf:"varint,3,opt,name=Tick,proto3" json:"Tick,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CNNode) Descriptor added in v0.5.1

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

func (*CNNode) GetServiceAddress added in v0.5.1

func (m *CNNode) GetServiceAddress() string

func (*CNNode) GetTick added in v0.5.1

func (m *CNNode) GetTick() uint64

func (*CNNode) GetUUID added in v0.5.1

func (m *CNNode) GetUUID() string

func (*CNNode) Marshal added in v0.5.1

func (m *CNNode) Marshal() (dAtA []byte, err error)

func (*CNNode) MarshalTo added in v0.5.1

func (m *CNNode) MarshalTo(dAtA []byte) (int, error)

func (*CNNode) MarshalToSizedBuffer added in v0.5.1

func (m *CNNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CNNode) ProtoMessage added in v0.5.1

func (*CNNode) ProtoMessage()

func (*CNNode) Reset added in v0.5.1

func (m *CNNode) Reset()

func (*CNNode) Size added in v0.5.1

func (m *CNNode) Size() (n int)

func (*CNNode) String added in v0.5.1

func (m *CNNode) String() string

func (*CNNode) Unmarshal added in v0.5.1

func (m *CNNode) Unmarshal(dAtA []byte) error

func (*CNNode) XXX_DiscardUnknown added in v0.5.1

func (m *CNNode) XXX_DiscardUnknown()

func (*CNNode) XXX_Marshal added in v0.5.1

func (m *CNNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CNNode) XXX_Merge added in v0.5.1

func (m *CNNode) XXX_Merge(src proto.Message)

func (*CNNode) XXX_Size added in v0.5.1

func (m *CNNode) XXX_Size() int

func (*CNNode) XXX_Unmarshal added in v0.5.1

func (m *CNNode) XXX_Unmarshal(b []byte) error

type CNState

type CNState struct {
	// Stores is keyed by CN store UUID.
	Stores               map[string]CNStoreInfo `` /* 143-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

CNState contains all CN details known to the HAKeeper.

func NewCNState

func NewCNState() CNState

NewCNState creates a new CNState.

func (*CNState) Descriptor

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

func (*CNState) GetStores

func (m *CNState) GetStores() map[string]CNStoreInfo

func (*CNState) Marshal

func (m *CNState) Marshal() (dAtA []byte, err error)

func (*CNState) MarshalTo

func (m *CNState) MarshalTo(dAtA []byte) (int, error)

func (*CNState) MarshalToSizedBuffer

func (m *CNState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CNState) ProtoMessage

func (*CNState) ProtoMessage()

func (*CNState) Reset

func (m *CNState) Reset()

func (*CNState) Size

func (m *CNState) Size() (n int)

func (*CNState) String

func (m *CNState) String() string

func (*CNState) Unmarshal

func (m *CNState) Unmarshal(dAtA []byte) error

func (*CNState) Update

func (s *CNState) Update(hb CNStoreHeartbeat, tick uint64)

Update applies the incoming CNStoreHeartbeat into HAKeeper. Tick is the current tick of the HAKeeper which is used as the timestamp of the heartbeat.

func (*CNState) XXX_DiscardUnknown

func (m *CNState) XXX_DiscardUnknown()

func (*CNState) XXX_Marshal

func (m *CNState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CNState) XXX_Merge

func (m *CNState) XXX_Merge(src proto.Message)

func (*CNState) XXX_Size

func (m *CNState) XXX_Size() int

func (*CNState) XXX_Unmarshal

func (m *CNState) XXX_Unmarshal(b []byte) error

type CNStoreHeartbeat

type CNStoreHeartbeat struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ServiceAddress       string   `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CNStoreHeartbeat is the periodic message sent tp the HAKeeper by CN stores.

func (*CNStoreHeartbeat) Descriptor

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

func (*CNStoreHeartbeat) GetServiceAddress added in v0.5.1

func (m *CNStoreHeartbeat) GetServiceAddress() string

func (*CNStoreHeartbeat) GetUUID

func (m *CNStoreHeartbeat) GetUUID() string

func (*CNStoreHeartbeat) Marshal

func (m *CNStoreHeartbeat) Marshal() (dAtA []byte, err error)

func (*CNStoreHeartbeat) MarshalTo

func (m *CNStoreHeartbeat) MarshalTo(dAtA []byte) (int, error)

func (*CNStoreHeartbeat) MarshalToSizedBuffer

func (m *CNStoreHeartbeat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CNStoreHeartbeat) ProtoMessage

func (*CNStoreHeartbeat) ProtoMessage()

func (*CNStoreHeartbeat) Reset

func (m *CNStoreHeartbeat) Reset()

func (*CNStoreHeartbeat) Size

func (m *CNStoreHeartbeat) Size() (n int)

func (*CNStoreHeartbeat) String

func (m *CNStoreHeartbeat) String() string

func (*CNStoreHeartbeat) Unmarshal

func (m *CNStoreHeartbeat) Unmarshal(dAtA []byte) error

func (*CNStoreHeartbeat) XXX_DiscardUnknown

func (m *CNStoreHeartbeat) XXX_DiscardUnknown()

func (*CNStoreHeartbeat) XXX_Marshal

func (m *CNStoreHeartbeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CNStoreHeartbeat) XXX_Merge

func (m *CNStoreHeartbeat) XXX_Merge(src proto.Message)

func (*CNStoreHeartbeat) XXX_Size

func (m *CNStoreHeartbeat) XXX_Size() int

func (*CNStoreHeartbeat) XXX_Unmarshal

func (m *CNStoreHeartbeat) XXX_Unmarshal(b []byte) error

type CNStoreInfo

type CNStoreInfo struct {
	Tick                 uint64   `protobuf:"varint,1,opt,name=Tick,proto3" json:"Tick,omitempty"`
	ServiceAddress       string   `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CNStoreInfo contains infroamtion on a CN store.

func (*CNStoreInfo) Descriptor

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

func (*CNStoreInfo) GetServiceAddress added in v0.5.1

func (m *CNStoreInfo) GetServiceAddress() string

func (*CNStoreInfo) GetTick

func (m *CNStoreInfo) GetTick() uint64

func (*CNStoreInfo) Marshal

func (m *CNStoreInfo) Marshal() (dAtA []byte, err error)

func (*CNStoreInfo) MarshalTo

func (m *CNStoreInfo) MarshalTo(dAtA []byte) (int, error)

func (*CNStoreInfo) MarshalToSizedBuffer

func (m *CNStoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CNStoreInfo) ProtoMessage

func (*CNStoreInfo) ProtoMessage()

func (*CNStoreInfo) Reset

func (m *CNStoreInfo) Reset()

func (*CNStoreInfo) Size

func (m *CNStoreInfo) Size() (n int)

func (*CNStoreInfo) String

func (m *CNStoreInfo) String() string

func (*CNStoreInfo) Unmarshal

func (m *CNStoreInfo) Unmarshal(dAtA []byte) error

func (*CNStoreInfo) XXX_DiscardUnknown

func (m *CNStoreInfo) XXX_DiscardUnknown()

func (*CNStoreInfo) XXX_Marshal

func (m *CNStoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CNStoreInfo) XXX_Merge

func (m *CNStoreInfo) XXX_Merge(src proto.Message)

func (*CNStoreInfo) XXX_Size

func (m *CNStoreInfo) XXX_Size() int

func (*CNStoreInfo) XXX_Unmarshal

func (m *CNStoreInfo) XXX_Unmarshal(b []byte) error

type CheckerState

type CheckerState struct {
	Tick                 uint64        `protobuf:"varint,1,opt,name=Tick,proto3" json:"Tick,omitempty"`
	ClusterInfo          ClusterInfo   `protobuf:"bytes,2,opt,name=ClusterInfo,proto3" json:"ClusterInfo"`
	DNState              DNState       `protobuf:"bytes,3,opt,name=DNState,proto3" json:"DNState"`
	LogState             LogState      `protobuf:"bytes,4,opt,name=LogState,proto3" json:"LogState"`
	State                HAKeeperState `protobuf:"varint,5,opt,name=State,proto3,enum=logservice.HAKeeperState" json:"State,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

CheckerState contains all HAKeeper state required for making schedule commands.

func (*CheckerState) Descriptor

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

func (*CheckerState) GetClusterInfo

func (m *CheckerState) GetClusterInfo() ClusterInfo

func (*CheckerState) GetDNState

func (m *CheckerState) GetDNState() DNState

func (*CheckerState) GetLogState

func (m *CheckerState) GetLogState() LogState

func (*CheckerState) GetState

func (m *CheckerState) GetState() HAKeeperState

func (*CheckerState) GetTick

func (m *CheckerState) GetTick() uint64

func (*CheckerState) Marshal

func (m *CheckerState) Marshal() (dAtA []byte, err error)

func (*CheckerState) MarshalTo

func (m *CheckerState) MarshalTo(dAtA []byte) (int, error)

func (*CheckerState) MarshalToSizedBuffer

func (m *CheckerState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckerState) ProtoMessage

func (*CheckerState) ProtoMessage()

func (*CheckerState) Reset

func (m *CheckerState) Reset()

func (*CheckerState) Size

func (m *CheckerState) Size() (n int)

func (*CheckerState) String

func (m *CheckerState) String() string

func (*CheckerState) Unmarshal

func (m *CheckerState) Unmarshal(dAtA []byte) error

func (*CheckerState) XXX_DiscardUnknown

func (m *CheckerState) XXX_DiscardUnknown()

func (*CheckerState) XXX_Marshal

func (m *CheckerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckerState) XXX_Merge

func (m *CheckerState) XXX_Merge(src proto.Message)

func (*CheckerState) XXX_Size

func (m *CheckerState) XXX_Size() int

func (*CheckerState) XXX_Unmarshal

func (m *CheckerState) XXX_Unmarshal(b []byte) error

type ClusterDetails added in v0.5.1

type ClusterDetails struct {
	DNNodes              []DNNode `protobuf:"bytes,1,rep,name=DNNodes,proto3" json:"DNNodes"`
	CNNodes              []CNNode `protobuf:"bytes,2,rep,name=CNNodes,proto3" json:"CNNodes"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClusterDetails) Descriptor added in v0.5.1

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

func (*ClusterDetails) GetCNNodes added in v0.5.1

func (m *ClusterDetails) GetCNNodes() []CNNode

func (*ClusterDetails) GetDNNodes added in v0.5.1

func (m *ClusterDetails) GetDNNodes() []DNNode

func (*ClusterDetails) Marshal added in v0.5.1

func (m *ClusterDetails) Marshal() (dAtA []byte, err error)

func (*ClusterDetails) MarshalTo added in v0.5.1

func (m *ClusterDetails) MarshalTo(dAtA []byte) (int, error)

func (*ClusterDetails) MarshalToSizedBuffer added in v0.5.1

func (m *ClusterDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterDetails) ProtoMessage added in v0.5.1

func (*ClusterDetails) ProtoMessage()

func (*ClusterDetails) Reset added in v0.5.1

func (m *ClusterDetails) Reset()

func (*ClusterDetails) Size added in v0.5.1

func (m *ClusterDetails) Size() (n int)

func (*ClusterDetails) String added in v0.5.1

func (m *ClusterDetails) String() string

func (*ClusterDetails) Unmarshal added in v0.5.1

func (m *ClusterDetails) Unmarshal(dAtA []byte) error

func (*ClusterDetails) XXX_DiscardUnknown added in v0.5.1

func (m *ClusterDetails) XXX_DiscardUnknown()

func (*ClusterDetails) XXX_Marshal added in v0.5.1

func (m *ClusterDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterDetails) XXX_Merge added in v0.5.1

func (m *ClusterDetails) XXX_Merge(src proto.Message)

func (*ClusterDetails) XXX_Size added in v0.5.1

func (m *ClusterDetails) XXX_Size() int

func (*ClusterDetails) XXX_Unmarshal added in v0.5.1

func (m *ClusterDetails) XXX_Unmarshal(b []byte) error

type ClusterInfo

type ClusterInfo struct {
	DNShards             []metadata.DNShardRecord  `protobuf:"bytes,1,rep,name=DNShards,proto3" json:"DNShards"`
	LogShards            []metadata.LogShardRecord `protobuf:"bytes,2,rep,name=LogShards,proto3" json:"LogShards"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

ClusterInfo provides a global view of all shards in the cluster. It describes the logical sharding of the system, rather than physical distribution of all replicas that belong to those shards.

func (*ClusterInfo) Descriptor

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

func (*ClusterInfo) GetDNShards

func (m *ClusterInfo) GetDNShards() []metadata.DNShardRecord

func (*ClusterInfo) GetLogShards

func (m *ClusterInfo) GetLogShards() []metadata.LogShardRecord

func (*ClusterInfo) Marshal

func (m *ClusterInfo) Marshal() (dAtA []byte, err error)

func (*ClusterInfo) MarshalTo

func (m *ClusterInfo) MarshalTo(dAtA []byte) (int, error)

func (*ClusterInfo) MarshalToSizedBuffer

func (m *ClusterInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterInfo) ProtoMessage

func (*ClusterInfo) ProtoMessage()

func (*ClusterInfo) Reset

func (m *ClusterInfo) Reset()

func (*ClusterInfo) Size

func (m *ClusterInfo) Size() (n int)

func (*ClusterInfo) String

func (m *ClusterInfo) String() string

func (*ClusterInfo) Unmarshal

func (m *ClusterInfo) Unmarshal(dAtA []byte) error

func (*ClusterInfo) XXX_DiscardUnknown

func (m *ClusterInfo) XXX_DiscardUnknown()

func (*ClusterInfo) XXX_Marshal

func (m *ClusterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterInfo) XXX_Merge

func (m *ClusterInfo) XXX_Merge(src proto.Message)

func (*ClusterInfo) XXX_Size

func (m *ClusterInfo) XXX_Size() int

func (*ClusterInfo) XXX_Unmarshal

func (m *ClusterInfo) XXX_Unmarshal(b []byte) error

type CommandBatch

type CommandBatch struct {
	Term                 uint64            `protobuf:"varint,1,opt,name=Term,proto3" json:"Term,omitempty"`
	Commands             []ScheduleCommand `protobuf:"bytes,2,rep,name=Commands,proto3" json:"Commands"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*CommandBatch) Descriptor

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

func (*CommandBatch) GetCommands

func (m *CommandBatch) GetCommands() []ScheduleCommand

func (*CommandBatch) GetTerm

func (m *CommandBatch) GetTerm() uint64

func (*CommandBatch) Marshal

func (m *CommandBatch) Marshal() (dAtA []byte, err error)

func (*CommandBatch) MarshalTo

func (m *CommandBatch) MarshalTo(dAtA []byte) (int, error)

func (*CommandBatch) MarshalToSizedBuffer

func (m *CommandBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CommandBatch) ProtoMessage

func (*CommandBatch) ProtoMessage()

func (*CommandBatch) Reset

func (m *CommandBatch) Reset()

func (*CommandBatch) Size

func (m *CommandBatch) Size() (n int)

func (*CommandBatch) String

func (m *CommandBatch) String() string

func (*CommandBatch) Unmarshal

func (m *CommandBatch) Unmarshal(dAtA []byte) error

func (*CommandBatch) XXX_DiscardUnknown

func (m *CommandBatch) XXX_DiscardUnknown()

func (*CommandBatch) XXX_Marshal

func (m *CommandBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandBatch) XXX_Merge

func (m *CommandBatch) XXX_Merge(src proto.Message)

func (*CommandBatch) XXX_Size

func (m *CommandBatch) XXX_Size() int

func (*CommandBatch) XXX_Unmarshal

func (m *CommandBatch) XXX_Unmarshal(b []byte) error

type ConfigChange

type ConfigChange struct {
	Replica    Replica          `protobuf:"bytes,1,opt,name=Replica,proto3" json:"Replica"`
	ChangeType ConfigChangeType `protobuf:"varint,2,opt,name=ChangeType,proto3,enum=logservice.ConfigChangeType" json:"ChangeType,omitempty"`
	// only used for bootstrap
	InitialMembers       map[uint64]string `` /* 170-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

ConfigChange is the detail of a config change.

func (*ConfigChange) Descriptor

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

func (*ConfigChange) GetChangeType

func (m *ConfigChange) GetChangeType() ConfigChangeType

func (*ConfigChange) GetInitialMembers

func (m *ConfigChange) GetInitialMembers() map[uint64]string

func (*ConfigChange) GetReplica

func (m *ConfigChange) GetReplica() Replica

func (*ConfigChange) Marshal

func (m *ConfigChange) Marshal() (dAtA []byte, err error)

func (*ConfigChange) MarshalTo

func (m *ConfigChange) MarshalTo(dAtA []byte) (int, error)

func (*ConfigChange) MarshalToSizedBuffer

func (m *ConfigChange) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConfigChange) ProtoMessage

func (*ConfigChange) ProtoMessage()

func (*ConfigChange) Reset

func (m *ConfigChange) Reset()

func (*ConfigChange) Size

func (m *ConfigChange) Size() (n int)

func (*ConfigChange) String

func (m *ConfigChange) String() string

func (*ConfigChange) Unmarshal

func (m *ConfigChange) Unmarshal(dAtA []byte) error

func (*ConfigChange) XXX_DiscardUnknown

func (m *ConfigChange) XXX_DiscardUnknown()

func (*ConfigChange) XXX_Marshal

func (m *ConfigChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigChange) XXX_Merge

func (m *ConfigChange) XXX_Merge(src proto.Message)

func (*ConfigChange) XXX_Size

func (m *ConfigChange) XXX_Size() int

func (*ConfigChange) XXX_Unmarshal

func (m *ConfigChange) XXX_Unmarshal(b []byte) error

type ConfigChangeType

type ConfigChangeType int32

ConfigChangeType indicates config change command type.

const (
	AddReplica    ConfigChangeType = 0
	RemoveReplica ConfigChangeType = 1
	StartReplica  ConfigChangeType = 2
	StopReplica   ConfigChangeType = 3
)

func (ConfigChangeType) EnumDescriptor

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

func (ConfigChangeType) String

func (x ConfigChangeType) String() string

type DNNode added in v0.5.1

type DNNode struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ServiceAddress       string   `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	Tick                 uint64   `protobuf:"varint,3,opt,name=Tick,proto3" json:"Tick,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DNNode) Descriptor added in v0.5.1

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

func (*DNNode) GetServiceAddress added in v0.5.1

func (m *DNNode) GetServiceAddress() string

func (*DNNode) GetTick added in v0.5.1

func (m *DNNode) GetTick() uint64

func (*DNNode) GetUUID added in v0.5.1

func (m *DNNode) GetUUID() string

func (*DNNode) Marshal added in v0.5.1

func (m *DNNode) Marshal() (dAtA []byte, err error)

func (*DNNode) MarshalTo added in v0.5.1

func (m *DNNode) MarshalTo(dAtA []byte) (int, error)

func (*DNNode) MarshalToSizedBuffer added in v0.5.1

func (m *DNNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DNNode) ProtoMessage added in v0.5.1

func (*DNNode) ProtoMessage()

func (*DNNode) Reset added in v0.5.1

func (m *DNNode) Reset()

func (*DNNode) Size added in v0.5.1

func (m *DNNode) Size() (n int)

func (*DNNode) String added in v0.5.1

func (m *DNNode) String() string

func (*DNNode) Unmarshal added in v0.5.1

func (m *DNNode) Unmarshal(dAtA []byte) error

func (*DNNode) XXX_DiscardUnknown added in v0.5.1

func (m *DNNode) XXX_DiscardUnknown()

func (*DNNode) XXX_Marshal added in v0.5.1

func (m *DNNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNNode) XXX_Merge added in v0.5.1

func (m *DNNode) XXX_Merge(src proto.Message)

func (*DNNode) XXX_Size added in v0.5.1

func (m *DNNode) XXX_Size() int

func (*DNNode) XXX_Unmarshal added in v0.5.1

func (m *DNNode) XXX_Unmarshal(b []byte) error

type DNShardInfo

type DNShardInfo struct {
	// ShardID uniquely identifies a DN shard. Each DN shard manages a Primary
	// Key range or hashed Primary Key value range.
	ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	// ReplicaID uniquely identifies a DN shard instance. After repairing a
	// failed DN shard, a new DN shard instance is created with a new ReplicaID
	// value.
	ReplicaID            uint64   `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DNShardInfo contains information of a launched DN shard.

func (*DNShardInfo) Descriptor

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

func (*DNShardInfo) GetReplicaID

func (m *DNShardInfo) GetReplicaID() uint64

func (*DNShardInfo) GetShardID

func (m *DNShardInfo) GetShardID() uint64

func (*DNShardInfo) Marshal

func (m *DNShardInfo) Marshal() (dAtA []byte, err error)

func (*DNShardInfo) MarshalTo

func (m *DNShardInfo) MarshalTo(dAtA []byte) (int, error)

func (*DNShardInfo) MarshalToSizedBuffer

func (m *DNShardInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DNShardInfo) ProtoMessage

func (*DNShardInfo) ProtoMessage()

func (*DNShardInfo) Reset

func (m *DNShardInfo) Reset()

func (*DNShardInfo) Size

func (m *DNShardInfo) Size() (n int)

func (*DNShardInfo) String

func (m *DNShardInfo) String() string

func (*DNShardInfo) Unmarshal

func (m *DNShardInfo) Unmarshal(dAtA []byte) error

func (*DNShardInfo) XXX_DiscardUnknown

func (m *DNShardInfo) XXX_DiscardUnknown()

func (*DNShardInfo) XXX_Marshal

func (m *DNShardInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNShardInfo) XXX_Merge

func (m *DNShardInfo) XXX_Merge(src proto.Message)

func (*DNShardInfo) XXX_Size

func (m *DNShardInfo) XXX_Size() int

func (*DNShardInfo) XXX_Unmarshal

func (m *DNShardInfo) XXX_Unmarshal(b []byte) error

type DNState

type DNState struct {
	// Stores is keyed by DN store UUID.
	Stores               map[string]DNStoreInfo `` /* 143-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

DNState contains all DN details known to the HAKeeper.

func NewDNState

func NewDNState() DNState

NewDNState creates a new DNState.

func (*DNState) Descriptor

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

func (*DNState) GetStores

func (m *DNState) GetStores() map[string]DNStoreInfo

func (*DNState) Marshal

func (m *DNState) Marshal() (dAtA []byte, err error)

func (*DNState) MarshalTo

func (m *DNState) MarshalTo(dAtA []byte) (int, error)

func (*DNState) MarshalToSizedBuffer

func (m *DNState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DNState) ProtoMessage

func (*DNState) ProtoMessage()

func (*DNState) Reset

func (m *DNState) Reset()

func (*DNState) Size

func (m *DNState) Size() (n int)

func (*DNState) String

func (m *DNState) String() string

func (*DNState) Unmarshal

func (m *DNState) Unmarshal(dAtA []byte) error

func (*DNState) Update

func (s *DNState) Update(hb DNStoreHeartbeat, tick uint64)

Update applies the incoming DNStoreHeartbeat into HAKeeper. Tick is the current tick of the HAKeeper which is used as the timestamp of the heartbeat.

func (*DNState) XXX_DiscardUnknown

func (m *DNState) XXX_DiscardUnknown()

func (*DNState) XXX_Marshal

func (m *DNState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNState) XXX_Merge

func (m *DNState) XXX_Merge(src proto.Message)

func (*DNState) XXX_Size

func (m *DNState) XXX_Size() int

func (*DNState) XXX_Unmarshal

func (m *DNState) XXX_Unmarshal(b []byte) error

type DNStoreHeartbeat

type DNStoreHeartbeat struct {
	// UUID is the uuid of the DN Store.
	UUID           string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ServiceAddress string `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	// Shards is a list of DNShardInfo instances collected on the specified
	// DN store.
	Shards               []DNShardInfo `protobuf:"bytes,3,rep,name=Shards,proto3" json:"Shards"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

DNStoreHeartbeat is the periodic message sent to the HAKeeper by DN stores.

func (*DNStoreHeartbeat) Descriptor

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

func (*DNStoreHeartbeat) GetServiceAddress added in v0.5.1

func (m *DNStoreHeartbeat) GetServiceAddress() string

func (*DNStoreHeartbeat) GetShards

func (m *DNStoreHeartbeat) GetShards() []DNShardInfo

func (*DNStoreHeartbeat) GetUUID

func (m *DNStoreHeartbeat) GetUUID() string

func (*DNStoreHeartbeat) Marshal

func (m *DNStoreHeartbeat) Marshal() (dAtA []byte, err error)

func (*DNStoreHeartbeat) MarshalTo

func (m *DNStoreHeartbeat) MarshalTo(dAtA []byte) (int, error)

func (*DNStoreHeartbeat) MarshalToSizedBuffer

func (m *DNStoreHeartbeat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DNStoreHeartbeat) ProtoMessage

func (*DNStoreHeartbeat) ProtoMessage()

func (*DNStoreHeartbeat) Reset

func (m *DNStoreHeartbeat) Reset()

func (*DNStoreHeartbeat) Size

func (m *DNStoreHeartbeat) Size() (n int)

func (*DNStoreHeartbeat) String

func (m *DNStoreHeartbeat) String() string

func (*DNStoreHeartbeat) Unmarshal

func (m *DNStoreHeartbeat) Unmarshal(dAtA []byte) error

func (*DNStoreHeartbeat) XXX_DiscardUnknown

func (m *DNStoreHeartbeat) XXX_DiscardUnknown()

func (*DNStoreHeartbeat) XXX_Marshal

func (m *DNStoreHeartbeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNStoreHeartbeat) XXX_Merge

func (m *DNStoreHeartbeat) XXX_Merge(src proto.Message)

func (*DNStoreHeartbeat) XXX_Size

func (m *DNStoreHeartbeat) XXX_Size() int

func (*DNStoreHeartbeat) XXX_Unmarshal

func (m *DNStoreHeartbeat) XXX_Unmarshal(b []byte) error

type DNStoreInfo

type DNStoreInfo struct {
	Tick                 uint64        `protobuf:"varint,1,opt,name=Tick,proto3" json:"Tick,omitempty"`
	ServiceAddress       string        `protobuf:"bytes,2,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	Shards               []DNShardInfo `protobuf:"bytes,3,rep,name=Shards,proto3" json:"Shards"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

DNStoreInfo contins information on a DN store.

func (*DNStoreInfo) Descriptor

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

func (*DNStoreInfo) GetServiceAddress added in v0.5.1

func (m *DNStoreInfo) GetServiceAddress() string

func (*DNStoreInfo) GetShards

func (m *DNStoreInfo) GetShards() []DNShardInfo

func (*DNStoreInfo) GetTick

func (m *DNStoreInfo) GetTick() uint64

func (*DNStoreInfo) Marshal

func (m *DNStoreInfo) Marshal() (dAtA []byte, err error)

func (*DNStoreInfo) MarshalTo

func (m *DNStoreInfo) MarshalTo(dAtA []byte) (int, error)

func (*DNStoreInfo) MarshalToSizedBuffer

func (m *DNStoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DNStoreInfo) ProtoMessage

func (*DNStoreInfo) ProtoMessage()

func (*DNStoreInfo) Reset

func (m *DNStoreInfo) Reset()

func (*DNStoreInfo) Size

func (m *DNStoreInfo) Size() (n int)

func (*DNStoreInfo) String

func (m *DNStoreInfo) String() string

func (*DNStoreInfo) Unmarshal

func (m *DNStoreInfo) Unmarshal(dAtA []byte) error

func (*DNStoreInfo) XXX_DiscardUnknown

func (m *DNStoreInfo) XXX_DiscardUnknown()

func (*DNStoreInfo) XXX_Marshal

func (m *DNStoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNStoreInfo) XXX_Merge

func (m *DNStoreInfo) XXX_Merge(src proto.Message)

func (*DNStoreInfo) XXX_Size

func (m *DNStoreInfo) XXX_Size() int

func (*DNStoreInfo) XXX_Unmarshal

func (m *DNStoreInfo) XXX_Unmarshal(b []byte) error

type ErrorCode

type ErrorCode int32
const (
	NoError             ErrorCode = 0
	Timeout             ErrorCode = 1
	Canceled            ErrorCode = 2
	InvalidShard        ErrorCode = 3
	InvalidTimeout      ErrorCode = 4
	InvalidPayload      ErrorCode = 5
	InvalidPayloadSize  ErrorCode = 6
	Rejected            ErrorCode = 7
	ShardNotReady       ErrorCode = 8
	SystemClosed        ErrorCode = 9
	LsnAlreadyTruncated ErrorCode = 100
	OutOfRange          ErrorCode = 101
	NotLeaseHolder      ErrorCode = 102
	OtherSystemError    ErrorCode = 1000
)

func (ErrorCode) EnumDescriptor

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

func (ErrorCode) String

func (x ErrorCode) String() string

type HAKeeperRSMState

type HAKeeperRSMState struct {
	Tick                 uint64                  `protobuf:"varint,1,opt,name=Tick,proto3" json:"Tick,omitempty"`
	NextID               uint64                  `protobuf:"varint,2,opt,name=NextID,proto3" json:"NextID,omitempty"`
	Term                 uint64                  `protobuf:"varint,3,opt,name=Term,proto3" json:"Term,omitempty"`
	State                HAKeeperState           `protobuf:"varint,4,opt,name=State,proto3,enum=logservice.HAKeeperState" json:"State,omitempty"`
	ScheduleCommands     map[string]CommandBatch `` /* 163-byte string literal not displayed */
	LogShards            map[string]uint64       `` /* 160-byte string literal not displayed */
	CNState              CNState                 `protobuf:"bytes,7,opt,name=CNState,proto3" json:"CNState"`
	DNState              DNState                 `protobuf:"bytes,8,opt,name=DNState,proto3" json:"DNState"`
	LogState             LogState                `protobuf:"bytes,9,opt,name=LogState,proto3" json:"LogState"`
	ClusterInfo          ClusterInfo             `protobuf:"bytes,10,opt,name=ClusterInfo,proto3" json:"ClusterInfo"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

HAKeeperRSMState contains state maintained by HAKeeper's RSM.

func NewRSMState

func NewRSMState() HAKeeperRSMState

NewRSMState creates a new HAKeeperRSMState instance.

func (*HAKeeperRSMState) Descriptor

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

func (*HAKeeperRSMState) GetCNState

func (m *HAKeeperRSMState) GetCNState() CNState

func (*HAKeeperRSMState) GetClusterInfo

func (m *HAKeeperRSMState) GetClusterInfo() ClusterInfo

func (*HAKeeperRSMState) GetDNState

func (m *HAKeeperRSMState) GetDNState() DNState

func (*HAKeeperRSMState) GetLogShards

func (m *HAKeeperRSMState) GetLogShards() map[string]uint64

func (*HAKeeperRSMState) GetLogState

func (m *HAKeeperRSMState) GetLogState() LogState

func (*HAKeeperRSMState) GetNextID

func (m *HAKeeperRSMState) GetNextID() uint64

func (*HAKeeperRSMState) GetScheduleCommands

func (m *HAKeeperRSMState) GetScheduleCommands() map[string]CommandBatch

func (*HAKeeperRSMState) GetState

func (m *HAKeeperRSMState) GetState() HAKeeperState

func (*HAKeeperRSMState) GetTerm

func (m *HAKeeperRSMState) GetTerm() uint64

func (*HAKeeperRSMState) GetTick

func (m *HAKeeperRSMState) GetTick() uint64

func (*HAKeeperRSMState) Marshal

func (m *HAKeeperRSMState) Marshal() (dAtA []byte, err error)

func (*HAKeeperRSMState) MarshalTo

func (m *HAKeeperRSMState) MarshalTo(dAtA []byte) (int, error)

func (*HAKeeperRSMState) MarshalToSizedBuffer

func (m *HAKeeperRSMState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HAKeeperRSMState) ProtoMessage

func (*HAKeeperRSMState) ProtoMessage()

func (*HAKeeperRSMState) Reset

func (m *HAKeeperRSMState) Reset()

func (*HAKeeperRSMState) Size

func (m *HAKeeperRSMState) Size() (n int)

func (*HAKeeperRSMState) String

func (m *HAKeeperRSMState) String() string

func (*HAKeeperRSMState) Unmarshal

func (m *HAKeeperRSMState) Unmarshal(dAtA []byte) error

func (*HAKeeperRSMState) XXX_DiscardUnknown

func (m *HAKeeperRSMState) XXX_DiscardUnknown()

func (*HAKeeperRSMState) XXX_Marshal

func (m *HAKeeperRSMState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HAKeeperRSMState) XXX_Merge

func (m *HAKeeperRSMState) XXX_Merge(src proto.Message)

func (*HAKeeperRSMState) XXX_Size

func (m *HAKeeperRSMState) XXX_Size() int

func (*HAKeeperRSMState) XXX_Unmarshal

func (m *HAKeeperRSMState) XXX_Unmarshal(b []byte) error

type HAKeeperState

type HAKeeperState int32
const (
	HAKeeperCreated                   HAKeeperState = 0
	HAKeeperBootstrapping             HAKeeperState = 1
	HAKeeperBootstrapCommandsReceived HAKeeperState = 2
	HAKeeperBootstrapFailed           HAKeeperState = 3
	HAKeeperRunning                   HAKeeperState = 4
)

func (HAKeeperState) EnumDescriptor

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

func (HAKeeperState) String

func (x HAKeeperState) String() string

type HAKeeperUpdateType

type HAKeeperUpdateType int32
const (
	TickUpdate            HAKeeperUpdateType = 0
	CNHeartbeatUpdate     HAKeeperUpdateType = 1
	DNHeartbeatUpdate     HAKeeperUpdateType = 2
	LogHeartbeatUpdate    HAKeeperUpdateType = 3
	GetIDUpdate           HAKeeperUpdateType = 4
	ScheduleCommandUpdate HAKeeperUpdateType = 5
	SetStateUpdate        HAKeeperUpdateType = 6
	InitialClusterUpdate  HAKeeperUpdateType = 7
)

func (HAKeeperUpdateType) EnumDescriptor

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

func (HAKeeperUpdateType) String

func (x HAKeeperUpdateType) String() string

type InitialClusterRequest

type InitialClusterRequest struct {
	NumOfLogShards       uint64   `protobuf:"varint,1,opt,name=NumOfLogShards,proto3" json:"NumOfLogShards,omitempty"`
	NumOfDNShards        uint64   `protobuf:"varint,2,opt,name=NumOfDNShards,proto3" json:"NumOfDNShards,omitempty"`
	NumOfLogReplicas     uint64   `protobuf:"varint,3,opt,name=NumOfLogReplicas,proto3" json:"NumOfLogReplicas,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InitialClusterRequest) Descriptor

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

func (*InitialClusterRequest) GetNumOfDNShards

func (m *InitialClusterRequest) GetNumOfDNShards() uint64

func (*InitialClusterRequest) GetNumOfLogReplicas

func (m *InitialClusterRequest) GetNumOfLogReplicas() uint64

func (*InitialClusterRequest) GetNumOfLogShards

func (m *InitialClusterRequest) GetNumOfLogShards() uint64

func (*InitialClusterRequest) Marshal

func (m *InitialClusterRequest) Marshal() (dAtA []byte, err error)

func (*InitialClusterRequest) MarshalTo

func (m *InitialClusterRequest) MarshalTo(dAtA []byte) (int, error)

func (*InitialClusterRequest) MarshalToSizedBuffer

func (m *InitialClusterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InitialClusterRequest) ProtoMessage

func (*InitialClusterRequest) ProtoMessage()

func (*InitialClusterRequest) Reset

func (m *InitialClusterRequest) Reset()

func (*InitialClusterRequest) Size

func (m *InitialClusterRequest) Size() (n int)

func (*InitialClusterRequest) String

func (m *InitialClusterRequest) String() string

func (*InitialClusterRequest) Unmarshal

func (m *InitialClusterRequest) Unmarshal(dAtA []byte) error

func (*InitialClusterRequest) XXX_DiscardUnknown

func (m *InitialClusterRequest) XXX_DiscardUnknown()

func (*InitialClusterRequest) XXX_Marshal

func (m *InitialClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InitialClusterRequest) XXX_Merge

func (m *InitialClusterRequest) XXX_Merge(src proto.Message)

func (*InitialClusterRequest) XXX_Size

func (m *InitialClusterRequest) XXX_Size() int

func (*InitialClusterRequest) XXX_Unmarshal

func (m *InitialClusterRequest) XXX_Unmarshal(b []byte) error

type LogRecord

type LogRecord struct {
	Lsn                  uint64     `protobuf:"varint,1,opt,name=Lsn,proto3" json:"Lsn,omitempty"`
	Type                 RecordType `protobuf:"varint,2,opt,name=Type,proto3,enum=logservice.RecordType" json:"Type,omitempty"`
	Data                 []byte     `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

LogRecord is what we store into the LogService.

func (*LogRecord) Descriptor

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

func (*LogRecord) GetData

func (m *LogRecord) GetData() []byte

func (*LogRecord) GetLsn

func (m *LogRecord) GetLsn() uint64

func (*LogRecord) GetType

func (m *LogRecord) GetType() RecordType

func (*LogRecord) Marshal

func (m *LogRecord) Marshal() (dAtA []byte, err error)

func (*LogRecord) MarshalTo

func (m *LogRecord) MarshalTo(dAtA []byte) (int, error)

func (*LogRecord) MarshalToSizedBuffer

func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRecord) Payload

func (m *LogRecord) Payload() []byte

Payload returns the payload byte slice.

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) Reset

func (m *LogRecord) Reset()

func (*LogRecord) ResizePayload

func (m *LogRecord) ResizePayload(length int)

ResizePayload resizes the payload length to length bytes.

func (*LogRecord) Size

func (m *LogRecord) Size() (n int)

func (*LogRecord) String

func (m *LogRecord) String() string

func (*LogRecord) Unmarshal

func (m *LogRecord) Unmarshal(dAtA []byte) error

func (*LogRecord) XXX_DiscardUnknown

func (m *LogRecord) XXX_DiscardUnknown()

func (*LogRecord) XXX_Marshal

func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRecord) XXX_Merge

func (m *LogRecord) XXX_Merge(src proto.Message)

func (*LogRecord) XXX_Size

func (m *LogRecord) XXX_Size() int

func (*LogRecord) XXX_Unmarshal

func (m *LogRecord) XXX_Unmarshal(b []byte) error

type LogRecordResponse

type LogRecordResponse struct {
	Records              []LogRecord `protobuf:"bytes,1,rep,name=Records,proto3" json:"Records"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*LogRecordResponse) Descriptor

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

func (*LogRecordResponse) GetRecords

func (m *LogRecordResponse) GetRecords() []LogRecord

func (*LogRecordResponse) Marshal

func (m *LogRecordResponse) Marshal() (dAtA []byte, err error)

func (*LogRecordResponse) MarshalTo

func (m *LogRecordResponse) MarshalTo(dAtA []byte) (int, error)

func (*LogRecordResponse) MarshalToSizedBuffer

func (m *LogRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRecordResponse) ProtoMessage

func (*LogRecordResponse) ProtoMessage()

func (*LogRecordResponse) Reset

func (m *LogRecordResponse) Reset()

func (*LogRecordResponse) Size

func (m *LogRecordResponse) Size() (n int)

func (*LogRecordResponse) String

func (m *LogRecordResponse) String() string

func (*LogRecordResponse) Unmarshal

func (m *LogRecordResponse) Unmarshal(dAtA []byte) error

func (*LogRecordResponse) XXX_DiscardUnknown

func (m *LogRecordResponse) XXX_DiscardUnknown()

func (*LogRecordResponse) XXX_Marshal

func (m *LogRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRecordResponse) XXX_Merge

func (m *LogRecordResponse) XXX_Merge(src proto.Message)

func (*LogRecordResponse) XXX_Size

func (m *LogRecordResponse) XXX_Size() int

func (*LogRecordResponse) XXX_Unmarshal

func (m *LogRecordResponse) XXX_Unmarshal(b []byte) error

type LogReplicaInfo

type LogReplicaInfo struct {
	LogShardInfo `protobuf:"bytes,1,opt,name=LogShardInfo,proto3,embedded=LogShardInfo" json:"LogShardInfo"`
	// ReplciaID is the ID of a replica within the Log shard.
	ReplicaID            uint64   `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogReplicaInfo contains information of a log replica.

func (*LogReplicaInfo) Descriptor

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

func (*LogReplicaInfo) GetReplicaID

func (m *LogReplicaInfo) GetReplicaID() uint64

func (*LogReplicaInfo) Marshal

func (m *LogReplicaInfo) Marshal() (dAtA []byte, err error)

func (*LogReplicaInfo) MarshalTo

func (m *LogReplicaInfo) MarshalTo(dAtA []byte) (int, error)

func (*LogReplicaInfo) MarshalToSizedBuffer

func (m *LogReplicaInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogReplicaInfo) ProtoMessage

func (*LogReplicaInfo) ProtoMessage()

func (*LogReplicaInfo) Reset

func (m *LogReplicaInfo) Reset()

func (*LogReplicaInfo) Size

func (m *LogReplicaInfo) Size() (n int)

func (*LogReplicaInfo) String

func (m *LogReplicaInfo) String() string

func (*LogReplicaInfo) Unmarshal

func (m *LogReplicaInfo) Unmarshal(dAtA []byte) error

func (*LogReplicaInfo) XXX_DiscardUnknown

func (m *LogReplicaInfo) XXX_DiscardUnknown()

func (*LogReplicaInfo) XXX_Marshal

func (m *LogReplicaInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogReplicaInfo) XXX_Merge

func (m *LogReplicaInfo) XXX_Merge(src proto.Message)

func (*LogReplicaInfo) XXX_Size

func (m *LogReplicaInfo) XXX_Size() int

func (*LogReplicaInfo) XXX_Unmarshal

func (m *LogReplicaInfo) XXX_Unmarshal(b []byte) error

type LogRequest

type LogRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	ShardID              uint64   `protobuf:"varint,2,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	Lsn                  uint64   `protobuf:"varint,3,opt,name=Lsn,proto3" json:"Lsn,omitempty"`
	MaxSize              uint64   `protobuf:"varint,4,opt,name=MaxSize,proto3" json:"MaxSize,omitempty"`
	DNShardID            uint64   `protobuf:"varint,5,opt,name=DNShardID,proto3" json:"DNShardID,omitempty"`
	DNID                 uint64   `protobuf:"varint,6,opt,name=DNID,proto3" json:"DNID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogRequest) Descriptor

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

func (*LogRequest) GetDNID

func (m *LogRequest) GetDNID() uint64

func (*LogRequest) GetDNShardID

func (m *LogRequest) GetDNShardID() uint64

func (*LogRequest) GetLsn

func (m *LogRequest) GetLsn() uint64

func (*LogRequest) GetMaxSize

func (m *LogRequest) GetMaxSize() uint64

func (*LogRequest) GetName

func (m *LogRequest) GetName() string

func (*LogRequest) GetShardID

func (m *LogRequest) GetShardID() uint64

func (*LogRequest) Marshal

func (m *LogRequest) Marshal() (dAtA []byte, err error)

func (*LogRequest) MarshalTo

func (m *LogRequest) MarshalTo(dAtA []byte) (int, error)

func (*LogRequest) MarshalToSizedBuffer

func (m *LogRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) Reset

func (m *LogRequest) Reset()

func (*LogRequest) Size

func (m *LogRequest) Size() (n int)

func (*LogRequest) String

func (m *LogRequest) String() string

func (*LogRequest) Unmarshal

func (m *LogRequest) Unmarshal(dAtA []byte) error

func (*LogRequest) XXX_DiscardUnknown

func (m *LogRequest) XXX_DiscardUnknown()

func (*LogRequest) XXX_Marshal

func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRequest) XXX_Merge

func (m *LogRequest) XXX_Merge(src proto.Message)

func (*LogRequest) XXX_Size

func (m *LogRequest) XXX_Size() int

func (*LogRequest) XXX_Unmarshal

func (m *LogRequest) XXX_Unmarshal(b []byte) error

type LogResponse

type LogResponse struct {
	ShardID              uint64   `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	Lsn                  uint64   `protobuf:"varint,2,opt,name=Lsn,proto3" json:"Lsn,omitempty"`
	LastLsn              uint64   `protobuf:"varint,3,opt,name=LastLsn,proto3" json:"LastLsn,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogResponse) Descriptor

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

func (*LogResponse) GetLastLsn

func (m *LogResponse) GetLastLsn() uint64

func (*LogResponse) GetLsn

func (m *LogResponse) GetLsn() uint64

func (*LogResponse) GetShardID

func (m *LogResponse) GetShardID() uint64

func (*LogResponse) Marshal

func (m *LogResponse) Marshal() (dAtA []byte, err error)

func (*LogResponse) MarshalTo

func (m *LogResponse) MarshalTo(dAtA []byte) (int, error)

func (*LogResponse) MarshalToSizedBuffer

func (m *LogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) Reset

func (m *LogResponse) Reset()

func (*LogResponse) Size

func (m *LogResponse) Size() (n int)

func (*LogResponse) String

func (m *LogResponse) String() string

func (*LogResponse) Unmarshal

func (m *LogResponse) Unmarshal(dAtA []byte) error

func (*LogResponse) XXX_DiscardUnknown

func (m *LogResponse) XXX_DiscardUnknown()

func (*LogResponse) XXX_Marshal

func (m *LogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogResponse) XXX_Merge

func (m *LogResponse) XXX_Merge(src proto.Message)

func (*LogResponse) XXX_Size

func (m *LogResponse) XXX_Size() int

func (*LogResponse) XXX_Unmarshal

func (m *LogResponse) XXX_Unmarshal(b []byte) error

type LogShardInfo

type LogShardInfo struct {
	// ShardID is the ID of a Log shard.
	ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	// Replicas is a map of ReplicaID to LogStore UUID, it describe the member
	// replicas of the shard at the given Epoch.
	Replicas map[uint64]string `` /* 158-byte string literal not displayed */
	// Epoch is the epoch value of the Shard, member replicas of the Shard can
	// change across epochs.
	Epoch uint64 `protobuf:"varint,3,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	// LeaderID is the ReplicaID of the leader replica at the given term. When
	// LeaderID is 0, it means there is no leader or the leader is unknown.
	LeaderID uint64 `protobuf:"varint,4,opt,name=LeaderID,proto3" json:"LeaderID,omitempty"`
	// Term is the Raft term value.
	Term                 uint64   `protobuf:"varint,5,opt,name=Term,proto3" json:"Term,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogShardInfo contains information a log shard.

func (*LogShardInfo) Descriptor

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

func (*LogShardInfo) GetEpoch

func (m *LogShardInfo) GetEpoch() uint64

func (*LogShardInfo) GetLeaderID

func (m *LogShardInfo) GetLeaderID() uint64

func (*LogShardInfo) GetReplicas

func (m *LogShardInfo) GetReplicas() map[uint64]string

func (*LogShardInfo) GetShardID

func (m *LogShardInfo) GetShardID() uint64

func (*LogShardInfo) GetTerm

func (m *LogShardInfo) GetTerm() uint64

func (*LogShardInfo) Marshal

func (m *LogShardInfo) Marshal() (dAtA []byte, err error)

func (*LogShardInfo) MarshalTo

func (m *LogShardInfo) MarshalTo(dAtA []byte) (int, error)

func (*LogShardInfo) MarshalToSizedBuffer

func (m *LogShardInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogShardInfo) ProtoMessage

func (*LogShardInfo) ProtoMessage()

func (*LogShardInfo) Reset

func (m *LogShardInfo) Reset()

func (*LogShardInfo) Size

func (m *LogShardInfo) Size() (n int)

func (*LogShardInfo) String

func (m *LogShardInfo) String() string

func (*LogShardInfo) Unmarshal

func (m *LogShardInfo) Unmarshal(dAtA []byte) error

func (*LogShardInfo) XXX_DiscardUnknown

func (m *LogShardInfo) XXX_DiscardUnknown()

func (*LogShardInfo) XXX_Marshal

func (m *LogShardInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogShardInfo) XXX_Merge

func (m *LogShardInfo) XXX_Merge(src proto.Message)

func (*LogShardInfo) XXX_Size

func (m *LogShardInfo) XXX_Size() int

func (*LogShardInfo) XXX_Unmarshal

func (m *LogShardInfo) XXX_Unmarshal(b []byte) error

type LogState

type LogState struct {
	// Shards is keyed by ShardID, it contains details aggregated from all Log
	// stores. Each pb.LogShardInfo here contains data aggregated from
	// different replicas and thus reflect a more accurate description on each
	// shard.
	Shards map[uint64]LogShardInfo `` /* 144-byte string literal not displayed */
	// Stores is keyed by log store UUID, it contains details found on each
	// store. Each LogStoreInfo here reflects what was last reported by each Log
	// store.
	Stores               map[string]LogStoreInfo `` /* 143-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func NewLogState

func NewLogState() LogState

NewLogState creates a new LogState.

func (*LogState) Descriptor

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

func (*LogState) GetShards

func (m *LogState) GetShards() map[uint64]LogShardInfo

func (*LogState) GetStores

func (m *LogState) GetStores() map[string]LogStoreInfo

func (*LogState) Marshal

func (m *LogState) Marshal() (dAtA []byte, err error)

func (*LogState) MarshalTo

func (m *LogState) MarshalTo(dAtA []byte) (int, error)

func (*LogState) MarshalToSizedBuffer

func (m *LogState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogState) ProtoMessage

func (*LogState) ProtoMessage()

func (*LogState) Reset

func (m *LogState) Reset()

func (*LogState) Size

func (m *LogState) Size() (n int)

func (*LogState) String

func (m *LogState) String() string

func (*LogState) Unmarshal

func (m *LogState) Unmarshal(dAtA []byte) error

func (*LogState) Update

func (s *LogState) Update(hb LogStoreHeartbeat, tick uint64)

Update applies the incoming heartbeat message to the LogState with the specified tick used as the timestamp.

func (*LogState) XXX_DiscardUnknown

func (m *LogState) XXX_DiscardUnknown()

func (*LogState) XXX_Marshal

func (m *LogState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogState) XXX_Merge

func (m *LogState) XXX_Merge(src proto.Message)

func (*LogState) XXX_Size

func (m *LogState) XXX_Size() int

func (*LogState) XXX_Unmarshal

func (m *LogState) XXX_Unmarshal(b []byte) error

type LogStoreHeartbeat

type LogStoreHeartbeat struct {
	// UUID is the uuid of the Log Store.
	UUID           string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	RaftAddress    string `protobuf:"bytes,2,opt,name=RaftAddress,proto3" json:"RaftAddress,omitempty"`
	ServiceAddress string `protobuf:"bytes,3,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	GossipAddress  string `protobuf:"bytes,4,opt,name=GossipAddress,proto3" json:"GossipAddress,omitempty"`
	// Replicas is a list of LogReplicaInfo instances collected on the specified
	// LogStore. Details in Shards are based on the local knowledge of each
	// replica running on the current LogStore, it may not be accurate or
	// update to date due to various reasons.
	Replicas             []LogReplicaInfo `protobuf:"bytes,5,rep,name=Replicas,proto3" json:"Replicas"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

LogStoreHeartbeat is the periodic message sent to the HAKeeper by Log Stores.

func (*LogStoreHeartbeat) Descriptor

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

func (*LogStoreHeartbeat) GetGossipAddress

func (m *LogStoreHeartbeat) GetGossipAddress() string

func (*LogStoreHeartbeat) GetRaftAddress

func (m *LogStoreHeartbeat) GetRaftAddress() string

func (*LogStoreHeartbeat) GetReplicas

func (m *LogStoreHeartbeat) GetReplicas() []LogReplicaInfo

func (*LogStoreHeartbeat) GetServiceAddress

func (m *LogStoreHeartbeat) GetServiceAddress() string

func (*LogStoreHeartbeat) GetUUID

func (m *LogStoreHeartbeat) GetUUID() string

func (*LogStoreHeartbeat) Marshal

func (m *LogStoreHeartbeat) Marshal() (dAtA []byte, err error)

func (*LogStoreHeartbeat) MarshalTo

func (m *LogStoreHeartbeat) MarshalTo(dAtA []byte) (int, error)

func (*LogStoreHeartbeat) MarshalToSizedBuffer

func (m *LogStoreHeartbeat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogStoreHeartbeat) ProtoMessage

func (*LogStoreHeartbeat) ProtoMessage()

func (*LogStoreHeartbeat) Reset

func (m *LogStoreHeartbeat) Reset()

func (*LogStoreHeartbeat) Size

func (m *LogStoreHeartbeat) Size() (n int)

func (*LogStoreHeartbeat) String

func (m *LogStoreHeartbeat) String() string

func (*LogStoreHeartbeat) Unmarshal

func (m *LogStoreHeartbeat) Unmarshal(dAtA []byte) error

func (*LogStoreHeartbeat) XXX_DiscardUnknown

func (m *LogStoreHeartbeat) XXX_DiscardUnknown()

func (*LogStoreHeartbeat) XXX_Marshal

func (m *LogStoreHeartbeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogStoreHeartbeat) XXX_Merge

func (m *LogStoreHeartbeat) XXX_Merge(src proto.Message)

func (*LogStoreHeartbeat) XXX_Size

func (m *LogStoreHeartbeat) XXX_Size() int

func (*LogStoreHeartbeat) XXX_Unmarshal

func (m *LogStoreHeartbeat) XXX_Unmarshal(b []byte) error

type LogStoreInfo

type LogStoreInfo struct {
	Tick                 uint64           `protobuf:"varint,1,opt,name=Tick,proto3" json:"Tick,omitempty"`
	RaftAddress          string           `protobuf:"bytes,2,opt,name=RaftAddress,proto3" json:"RaftAddress,omitempty"`
	ServiceAddress       string           `protobuf:"bytes,3,opt,name=ServiceAddress,proto3" json:"ServiceAddress,omitempty"`
	GossipAddress        string           `protobuf:"bytes,4,opt,name=GossipAddress,proto3" json:"GossipAddress,omitempty"`
	Replicas             []LogReplicaInfo `protobuf:"bytes,5,rep,name=Replicas,proto3" json:"Replicas"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

LogStoreInfo contains information of all replicas found on a Log store.

func (*LogStoreInfo) Descriptor

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

func (*LogStoreInfo) GetGossipAddress

func (m *LogStoreInfo) GetGossipAddress() string

func (*LogStoreInfo) GetRaftAddress

func (m *LogStoreInfo) GetRaftAddress() string

func (*LogStoreInfo) GetReplicas

func (m *LogStoreInfo) GetReplicas() []LogReplicaInfo

func (*LogStoreInfo) GetServiceAddress

func (m *LogStoreInfo) GetServiceAddress() string

func (*LogStoreInfo) GetTick

func (m *LogStoreInfo) GetTick() uint64

func (*LogStoreInfo) Marshal

func (m *LogStoreInfo) Marshal() (dAtA []byte, err error)

func (*LogStoreInfo) MarshalTo

func (m *LogStoreInfo) MarshalTo(dAtA []byte) (int, error)

func (*LogStoreInfo) MarshalToSizedBuffer

func (m *LogStoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogStoreInfo) ProtoMessage

func (*LogStoreInfo) ProtoMessage()

func (*LogStoreInfo) Reset

func (m *LogStoreInfo) Reset()

func (*LogStoreInfo) Size

func (m *LogStoreInfo) Size() (n int)

func (*LogStoreInfo) String

func (m *LogStoreInfo) String() string

func (*LogStoreInfo) Unmarshal

func (m *LogStoreInfo) Unmarshal(dAtA []byte) error

func (*LogStoreInfo) XXX_DiscardUnknown

func (m *LogStoreInfo) XXX_DiscardUnknown()

func (*LogStoreInfo) XXX_Marshal

func (m *LogStoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogStoreInfo) XXX_Merge

func (m *LogStoreInfo) XXX_Merge(src proto.Message)

func (*LogStoreInfo) XXX_Size

func (m *LogStoreInfo) XXX_Size() int

func (*LogStoreInfo) XXX_Unmarshal

func (m *LogStoreInfo) XXX_Unmarshal(b []byte) error

type MethodType

type MethodType int32
const (
	TSO_UPDATE          MethodType = 0
	APPEND              MethodType = 1
	READ                MethodType = 2
	TRUNCATE            MethodType = 3
	GET_TRUNCATE        MethodType = 4
	CONNECT             MethodType = 5
	CONNECT_RO          MethodType = 6
	LOG_HEARTBEAT       MethodType = 7
	CN_HEARTBEAT        MethodType = 8
	DN_HEARTBEAT        MethodType = 9
	CHECK_HAKEEPER      MethodType = 10
	GET_CLUSTER_DETAILS MethodType = 11
)

func (MethodType) EnumDescriptor

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

func (MethodType) String

func (x MethodType) String() string

type RSMState

type RSMState struct {
	Tso                  uint64            `protobuf:"varint,1,opt,name=Tso,proto3" json:"Tso,omitempty"`
	Index                uint64            `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"`
	LeaseHolderID        uint64            `protobuf:"varint,3,opt,name=LeaseHolderID,proto3" json:"LeaseHolderID,omitempty"`
	TruncatedLsn         uint64            `protobuf:"varint,4,opt,name=TruncatedLsn,proto3" json:"TruncatedLsn,omitempty"`
	LeaseHistory         map[uint64]uint64 `` /* 167-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*RSMState) Descriptor

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

func (*RSMState) GetIndex

func (m *RSMState) GetIndex() uint64

func (*RSMState) GetLeaseHistory

func (m *RSMState) GetLeaseHistory() map[uint64]uint64

func (*RSMState) GetLeaseHolderID

func (m *RSMState) GetLeaseHolderID() uint64

func (*RSMState) GetTruncatedLsn

func (m *RSMState) GetTruncatedLsn() uint64

func (*RSMState) GetTso

func (m *RSMState) GetTso() uint64

func (*RSMState) Marshal

func (m *RSMState) Marshal() (dAtA []byte, err error)

func (*RSMState) MarshalTo

func (m *RSMState) MarshalTo(dAtA []byte) (int, error)

func (*RSMState) MarshalToSizedBuffer

func (m *RSMState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RSMState) ProtoMessage

func (*RSMState) ProtoMessage()

func (*RSMState) Reset

func (m *RSMState) Reset()

func (*RSMState) Size

func (m *RSMState) Size() (n int)

func (*RSMState) String

func (m *RSMState) String() string

func (*RSMState) Unmarshal

func (m *RSMState) Unmarshal(dAtA []byte) error

func (*RSMState) XXX_DiscardUnknown

func (m *RSMState) XXX_DiscardUnknown()

func (*RSMState) XXX_Marshal

func (m *RSMState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RSMState) XXX_Merge

func (m *RSMState) XXX_Merge(src proto.Message)

func (*RSMState) XXX_Size

func (m *RSMState) XXX_Size() int

func (*RSMState) XXX_Unmarshal

func (m *RSMState) XXX_Unmarshal(b []byte) error

type RecordType

type RecordType int32
const (
	UserRecord    RecordType = 0
	Internal      RecordType = 1
	LeaseUpdate   RecordType = 2
	LeaseRejected RecordType = 3
)

func (RecordType) EnumDescriptor

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

func (RecordType) String

func (x RecordType) String() string

type Replica

type Replica struct {
	// UUID which store the Replica is located in
	UUID                 string   `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ShardID              uint64   `protobuf:"varint,2,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	ReplicaID            uint64   `protobuf:"varint,3,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"`
	Epoch                uint64   `protobuf:"varint,4,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Replica of the shard

func (*Replica) Descriptor

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

func (*Replica) GetEpoch

func (m *Replica) GetEpoch() uint64

func (*Replica) GetReplicaID

func (m *Replica) GetReplicaID() uint64

func (*Replica) GetShardID

func (m *Replica) GetShardID() uint64

func (*Replica) GetUUID

func (m *Replica) GetUUID() string

func (*Replica) Marshal

func (m *Replica) Marshal() (dAtA []byte, err error)

func (*Replica) MarshalTo

func (m *Replica) MarshalTo(dAtA []byte) (int, error)

func (*Replica) MarshalToSizedBuffer

func (m *Replica) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Replica) ProtoMessage

func (*Replica) ProtoMessage()

func (*Replica) Reset

func (m *Replica) Reset()

func (*Replica) Size

func (m *Replica) Size() (n int)

func (*Replica) String

func (m *Replica) String() string

func (*Replica) Unmarshal

func (m *Replica) Unmarshal(dAtA []byte) error

func (*Replica) XXX_DiscardUnknown

func (m *Replica) XXX_DiscardUnknown()

func (*Replica) XXX_Marshal

func (m *Replica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Replica) XXX_Merge

func (m *Replica) XXX_Merge(src proto.Message)

func (*Replica) XXX_Size

func (m *Replica) XXX_Size() int

func (*Replica) XXX_Unmarshal

func (m *Replica) XXX_Unmarshal(b []byte) error

type Request

type Request struct {
	RequestID            uint64            `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"`
	Method               MethodType        `protobuf:"varint,2,opt,name=Method,proto3,enum=logservice.MethodType" json:"Method,omitempty"`
	Timeout              int64             `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	LogRequest           LogRequest        `protobuf:"bytes,4,opt,name=LogRequest,proto3" json:"LogRequest"`
	LogHeartbeat         LogStoreHeartbeat `protobuf:"bytes,5,opt,name=LogHeartbeat,proto3" json:"LogHeartbeat"`
	CNHeartbeat          CNStoreHeartbeat  `protobuf:"bytes,6,opt,name=CNHeartbeat,proto3" json:"CNHeartbeat"`
	DNHeartbeat          DNStoreHeartbeat  `protobuf:"bytes,7,opt,name=DNHeartbeat,proto3" json:"DNHeartbeat"`
	TsoRequest           TsoRequest        `protobuf:"bytes,8,opt,name=TsoRequest,proto3" json:"TsoRequest"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetCNHeartbeat

func (m *Request) GetCNHeartbeat() CNStoreHeartbeat

func (*Request) GetDNHeartbeat

func (m *Request) GetDNHeartbeat() DNStoreHeartbeat

func (*Request) GetLogHeartbeat

func (m *Request) GetLogHeartbeat() LogStoreHeartbeat

func (*Request) GetLogRequest

func (m *Request) GetLogRequest() LogRequest

func (*Request) GetMethod

func (m *Request) GetMethod() MethodType

func (*Request) GetRequestID

func (m *Request) GetRequestID() uint64

func (*Request) GetTimeout

func (m *Request) GetTimeout() int64

func (*Request) GetTsoRequest

func (m *Request) GetTsoRequest() TsoRequest

func (*Request) Marshal

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) MarshalToSizedBuffer

func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

func (m *Request) Size() (n int)

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

func (m *Request) Unmarshal(dAtA []byte) error

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	RequestID            uint64         `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"`
	Method               MethodType     `protobuf:"varint,2,opt,name=Method,proto3,enum=logservice.MethodType" json:"Method,omitempty"`
	ErrorCode            ErrorCode      `protobuf:"varint,3,opt,name=ErrorCode,proto3,enum=logservice.ErrorCode" json:"ErrorCode,omitempty"`
	ErrorMessage         string         `protobuf:"bytes,4,opt,name=ErrorMessage,proto3" json:"ErrorMessage,omitempty"`
	IsHAKeeper           bool           `protobuf:"varint,5,opt,name=IsHAKeeper,proto3" json:"IsHAKeeper,omitempty"`
	LogResponse          LogResponse    `protobuf:"bytes,6,opt,name=LogResponse,proto3" json:"LogResponse"`
	CommandBatch         CommandBatch   `protobuf:"bytes,7,opt,name=CommandBatch,proto3" json:"CommandBatch"`
	TsoResponse          TsoResponse    `protobuf:"bytes,8,opt,name=TsoResponse,proto3" json:"TsoResponse"`
	ClusterDetails       ClusterDetails `protobuf:"bytes,9,opt,name=ClusterDetails,proto3" json:"ClusterDetails"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetClusterDetails added in v0.5.1

func (m *Response) GetClusterDetails() ClusterDetails

func (*Response) GetCommandBatch

func (m *Response) GetCommandBatch() CommandBatch

func (*Response) GetErrorCode

func (m *Response) GetErrorCode() ErrorCode

func (*Response) GetErrorMessage

func (m *Response) GetErrorMessage() string

func (*Response) GetIsHAKeeper added in v0.5.1

func (m *Response) GetIsHAKeeper() bool

func (*Response) GetLogResponse

func (m *Response) GetLogResponse() LogResponse

func (*Response) GetMethod

func (m *Response) GetMethod() MethodType

func (*Response) GetRequestID

func (m *Response) GetRequestID() uint64

func (*Response) GetTsoResponse

func (m *Response) GetTsoResponse() TsoResponse

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) MarshalToSizedBuffer

func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type ScheduleCommand

type ScheduleCommand struct {
	// UUID which store the ScheduleCommand is sent to
	UUID                 string         `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	Bootstrapping        bool           `protobuf:"varint,2,opt,name=Bootstrapping,proto3" json:"Bootstrapping,omitempty"`
	ConfigChange         *ConfigChange  `protobuf:"bytes,3,opt,name=ConfigChange,proto3" json:"ConfigChange,omitempty"`
	ServiceType          ServiceType    `protobuf:"varint,4,opt,name=ServiceType,proto3,enum=logservice.ServiceType" json:"ServiceType,omitempty"`
	ShutdownStore        *ShutdownStore `protobuf:"bytes,5,opt,name=ShutdownStore,proto3" json:"ShutdownStore,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

ScheduleCommand contains a shard schedule command.

func (*ScheduleCommand) Descriptor

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

func (*ScheduleCommand) GetBootstrapping

func (m *ScheduleCommand) GetBootstrapping() bool

func (*ScheduleCommand) GetConfigChange

func (m *ScheduleCommand) GetConfigChange() *ConfigChange

func (*ScheduleCommand) GetServiceType

func (m *ScheduleCommand) GetServiceType() ServiceType

func (*ScheduleCommand) GetShutdownStore

func (m *ScheduleCommand) GetShutdownStore() *ShutdownStore

func (*ScheduleCommand) GetUUID

func (m *ScheduleCommand) GetUUID() string

func (*ScheduleCommand) LogString added in v0.5.1

func (m *ScheduleCommand) LogString() string

LogString returns "ServiceType/ConfigChangeType UUID RepUuid:RepShardID:RepID InitialMembers"

func (*ScheduleCommand) Marshal

func (m *ScheduleCommand) Marshal() (dAtA []byte, err error)

func (*ScheduleCommand) MarshalTo

func (m *ScheduleCommand) MarshalTo(dAtA []byte) (int, error)

func (*ScheduleCommand) MarshalToSizedBuffer

func (m *ScheduleCommand) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ScheduleCommand) ProtoMessage

func (*ScheduleCommand) ProtoMessage()

func (*ScheduleCommand) Reset

func (m *ScheduleCommand) Reset()

func (*ScheduleCommand) Size

func (m *ScheduleCommand) Size() (n int)

func (*ScheduleCommand) String

func (m *ScheduleCommand) String() string

func (*ScheduleCommand) Unmarshal

func (m *ScheduleCommand) Unmarshal(dAtA []byte) error

func (*ScheduleCommand) XXX_DiscardUnknown

func (m *ScheduleCommand) XXX_DiscardUnknown()

func (*ScheduleCommand) XXX_Marshal

func (m *ScheduleCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ScheduleCommand) XXX_Merge

func (m *ScheduleCommand) XXX_Merge(src proto.Message)

func (*ScheduleCommand) XXX_Size

func (m *ScheduleCommand) XXX_Size() int

func (*ScheduleCommand) XXX_Unmarshal

func (m *ScheduleCommand) XXX_Unmarshal(b []byte) error

type ServiceType

type ServiceType int32

ServiceType specifies type of service

const (
	LogService ServiceType = 0
	DnService  ServiceType = 1
)

func (ServiceType) EnumDescriptor

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

func (ServiceType) String

func (x ServiceType) String() string

type ShutdownStore

type ShutdownStore struct {
	StoreID              string   `protobuf:"bytes,1,opt,name=StoreID,proto3" json:"StoreID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ShutdownStore would stop store.

func (*ShutdownStore) Descriptor

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

func (*ShutdownStore) GetStoreID

func (m *ShutdownStore) GetStoreID() string

func (*ShutdownStore) Marshal

func (m *ShutdownStore) Marshal() (dAtA []byte, err error)

func (*ShutdownStore) MarshalTo

func (m *ShutdownStore) MarshalTo(dAtA []byte) (int, error)

func (*ShutdownStore) MarshalToSizedBuffer

func (m *ShutdownStore) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ShutdownStore) ProtoMessage

func (*ShutdownStore) ProtoMessage()

func (*ShutdownStore) Reset

func (m *ShutdownStore) Reset()

func (*ShutdownStore) Size

func (m *ShutdownStore) Size() (n int)

func (*ShutdownStore) String

func (m *ShutdownStore) String() string

func (*ShutdownStore) Unmarshal

func (m *ShutdownStore) Unmarshal(dAtA []byte) error

func (*ShutdownStore) XXX_DiscardUnknown

func (m *ShutdownStore) XXX_DiscardUnknown()

func (*ShutdownStore) XXX_Marshal

func (m *ShutdownStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShutdownStore) XXX_Merge

func (m *ShutdownStore) XXX_Merge(src proto.Message)

func (*ShutdownStore) XXX_Size

func (m *ShutdownStore) XXX_Size() int

func (*ShutdownStore) XXX_Unmarshal

func (m *ShutdownStore) XXX_Unmarshal(b []byte) error

type TsoRequest

type TsoRequest struct {
	Count                uint64   `protobuf:"varint,1,opt,name=Count,proto3" json:"Count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TsoRequest) Descriptor

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

func (*TsoRequest) GetCount

func (m *TsoRequest) GetCount() uint64

func (*TsoRequest) Marshal

func (m *TsoRequest) Marshal() (dAtA []byte, err error)

func (*TsoRequest) MarshalTo

func (m *TsoRequest) MarshalTo(dAtA []byte) (int, error)

func (*TsoRequest) MarshalToSizedBuffer

func (m *TsoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TsoRequest) ProtoMessage

func (*TsoRequest) ProtoMessage()

func (*TsoRequest) Reset

func (m *TsoRequest) Reset()

func (*TsoRequest) Size

func (m *TsoRequest) Size() (n int)

func (*TsoRequest) String

func (m *TsoRequest) String() string

func (*TsoRequest) Unmarshal

func (m *TsoRequest) Unmarshal(dAtA []byte) error

func (*TsoRequest) XXX_DiscardUnknown

func (m *TsoRequest) XXX_DiscardUnknown()

func (*TsoRequest) XXX_Marshal

func (m *TsoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TsoRequest) XXX_Merge

func (m *TsoRequest) XXX_Merge(src proto.Message)

func (*TsoRequest) XXX_Size

func (m *TsoRequest) XXX_Size() int

func (*TsoRequest) XXX_Unmarshal

func (m *TsoRequest) XXX_Unmarshal(b []byte) error

type TsoResponse

type TsoResponse struct {
	Value                uint64   `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TsoResponse) Descriptor

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

func (*TsoResponse) GetValue

func (m *TsoResponse) GetValue() uint64

func (*TsoResponse) Marshal

func (m *TsoResponse) Marshal() (dAtA []byte, err error)

func (*TsoResponse) MarshalTo

func (m *TsoResponse) MarshalTo(dAtA []byte) (int, error)

func (*TsoResponse) MarshalToSizedBuffer

func (m *TsoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TsoResponse) ProtoMessage

func (*TsoResponse) ProtoMessage()

func (*TsoResponse) Reset

func (m *TsoResponse) Reset()

func (*TsoResponse) Size

func (m *TsoResponse) Size() (n int)

func (*TsoResponse) String

func (m *TsoResponse) String() string

func (*TsoResponse) Unmarshal

func (m *TsoResponse) Unmarshal(dAtA []byte) error

func (*TsoResponse) XXX_DiscardUnknown

func (m *TsoResponse) XXX_DiscardUnknown()

func (*TsoResponse) XXX_Marshal

func (m *TsoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TsoResponse) XXX_Merge

func (m *TsoResponse) XXX_Merge(src proto.Message)

func (*TsoResponse) XXX_Size

func (m *TsoResponse) XXX_Size() int

func (*TsoResponse) XXX_Unmarshal

func (m *TsoResponse) XXX_Unmarshal(b []byte) error

type UpdateType

type UpdateType int32
const (
	LeaseHolderIDUpdate UpdateType = 0
	TruncateLSNUpdate   UpdateType = 1
	UserEntryUpdate     UpdateType = 2
	TSOUpdate           UpdateType = 3
)

func (UpdateType) EnumDescriptor

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

func (UpdateType) String

func (x UpdateType) String() string

Jump to

Keyboard shortcuts

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