rsm

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 26 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ResponseCode_name = map[int32]string{
	0:  "OK",
	1:  "ERROR",
	2:  "UNKNOWN",
	3:  "CANCELED",
	4:  "NOT_FOUND",
	5:  "ALREADY_EXISTS",
	6:  "UNAUTHORIZED",
	7:  "FORBIDDEN",
	8:  "CONFLICT",
	9:  "INVALID",
	10: "UNAVAILABLE",
	11: "NOT_SUPPORTED",
	12: "TIMEOUT",
	13: "INTERNAL",
}
View Source
var ResponseCode_value = map[string]int32{
	"OK":             0,
	"ERROR":          1,
	"UNKNOWN":        2,
	"CANCELED":       3,
	"NOT_FOUND":      4,
	"ALREADY_EXISTS": 5,
	"UNAUTHORIZED":   6,
	"FORBIDDEN":      7,
	"CONFLICT":       8,
	"INVALID":        9,
	"UNAVAILABLE":    10,
	"NOT_SUPPORTED":  11,
	"TIMEOUT":        12,
	"INTERNAL":       13,
}
View Source
var SessionCommandState_name = map[int32]string{
	0: "COMMAND_OPEN",
	1: "COMMAND_COMPLETE",
}
View Source
var SessionCommandState_value = map[string]int32{
	"COMMAND_OPEN":     0,
	"COMMAND_COMPLETE": 1,
}

Functions

func GetErrorFromStatus

func GetErrorFromStatus(status ResponseStatus) error

GetErrorFromStatus creates a typed error from a response status

func RegisterPartitionServiceServer added in v0.9.1

func RegisterPartitionServiceServer(s *grpc.Server, srv PartitionServiceServer)

Types

type BackupService

type BackupService interface {
	// Backup is called to take a snapshot of the service state
	Backup(writer io.Writer) error
}

BackupService is an interface for backing up a service

type CloseServiceRequest added in v0.9.1

type CloseServiceRequest struct {
	ServiceID ServiceID `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3,casttype=ServiceID" json:"service_id,omitempty"`
}

func (*CloseServiceRequest) Descriptor added in v0.9.1

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

func (*CloseServiceRequest) GetServiceID added in v0.9.1

func (m *CloseServiceRequest) GetServiceID() ServiceID

func (*CloseServiceRequest) Marshal added in v0.9.1

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

func (*CloseServiceRequest) MarshalTo added in v0.9.1

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

func (*CloseServiceRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*CloseServiceRequest) ProtoMessage added in v0.9.1

func (*CloseServiceRequest) ProtoMessage()

func (*CloseServiceRequest) Reset added in v0.9.1

func (m *CloseServiceRequest) Reset()

func (*CloseServiceRequest) Size added in v0.9.1

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

func (*CloseServiceRequest) String added in v0.9.1

func (m *CloseServiceRequest) String() string

func (*CloseServiceRequest) Unmarshal added in v0.9.1

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

func (*CloseServiceRequest) XXX_DiscardUnknown added in v0.9.1

func (m *CloseServiceRequest) XXX_DiscardUnknown()

func (*CloseServiceRequest) XXX_Marshal added in v0.9.1

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

func (*CloseServiceRequest) XXX_Merge added in v0.9.1

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

func (*CloseServiceRequest) XXX_Size added in v0.9.1

func (m *CloseServiceRequest) XXX_Size() int

func (*CloseServiceRequest) XXX_Unmarshal added in v0.9.1

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

type CloseServiceResponse added in v0.9.1

type CloseServiceResponse struct {
}

func (*CloseServiceResponse) Descriptor added in v0.9.1

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

func (*CloseServiceResponse) Marshal added in v0.9.1

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

func (*CloseServiceResponse) MarshalTo added in v0.9.1

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

func (*CloseServiceResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*CloseServiceResponse) ProtoMessage added in v0.9.1

func (*CloseServiceResponse) ProtoMessage()

func (*CloseServiceResponse) Reset added in v0.9.1

func (m *CloseServiceResponse) Reset()

func (*CloseServiceResponse) Size added in v0.9.1

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

func (*CloseServiceResponse) String added in v0.9.1

func (m *CloseServiceResponse) String() string

func (*CloseServiceResponse) Unmarshal added in v0.9.1

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

func (*CloseServiceResponse) XXX_DiscardUnknown added in v0.9.1

func (m *CloseServiceResponse) XXX_DiscardUnknown()

func (*CloseServiceResponse) XXX_Marshal added in v0.9.1

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

func (*CloseServiceResponse) XXX_Merge added in v0.9.1

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

func (*CloseServiceResponse) XXX_Size added in v0.9.1

func (m *CloseServiceResponse) XXX_Size() int

func (*CloseServiceResponse) XXX_Unmarshal added in v0.9.1

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

type CloseSessionRequest

type CloseSessionRequest struct {
	SessionID SessionID `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
}

func (*CloseSessionRequest) Descriptor

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

func (*CloseSessionRequest) GetSessionID

func (m *CloseSessionRequest) GetSessionID() SessionID

func (*CloseSessionRequest) Marshal

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

func (*CloseSessionRequest) MarshalTo

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

func (*CloseSessionRequest) MarshalToSizedBuffer

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

func (*CloseSessionRequest) ProtoMessage

func (*CloseSessionRequest) ProtoMessage()

func (*CloseSessionRequest) Reset

func (m *CloseSessionRequest) Reset()

func (*CloseSessionRequest) Size

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

func (*CloseSessionRequest) String

func (m *CloseSessionRequest) String() string

func (*CloseSessionRequest) Unmarshal

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

func (*CloseSessionRequest) XXX_DiscardUnknown

func (m *CloseSessionRequest) XXX_DiscardUnknown()

func (*CloseSessionRequest) XXX_Marshal

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

func (*CloseSessionRequest) XXX_Merge

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

func (*CloseSessionRequest) XXX_Size

func (m *CloseSessionRequest) XXX_Size() int

func (*CloseSessionRequest) XXX_Unmarshal

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

type CloseSessionResponse

type CloseSessionResponse struct {
}

func (*CloseSessionResponse) Descriptor

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

func (*CloseSessionResponse) Marshal

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

func (*CloseSessionResponse) MarshalTo

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

func (*CloseSessionResponse) MarshalToSizedBuffer

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

func (*CloseSessionResponse) ProtoMessage

func (*CloseSessionResponse) ProtoMessage()

func (*CloseSessionResponse) Reset

func (m *CloseSessionResponse) Reset()

func (*CloseSessionResponse) Size

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

func (*CloseSessionResponse) String

func (m *CloseSessionResponse) String() string

func (*CloseSessionResponse) Unmarshal

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

func (*CloseSessionResponse) XXX_DiscardUnknown

func (m *CloseSessionResponse) XXX_DiscardUnknown()

func (*CloseSessionResponse) XXX_Marshal

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

func (*CloseSessionResponse) XXX_Merge

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

func (*CloseSessionResponse) XXX_Size

func (m *CloseSessionResponse) XXX_Size() int

func (*CloseSessionResponse) XXX_Unmarshal

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

type Command added in v0.9.1

type Command interface {
	Operation
	// ID returns the command identifier
	ID() CommandID
	// State returns the current command state
	State() CommandState
	// Watch watches the command state
	Watch(f func(CommandState)) Watcher
}

Command is a command operation

type CommandID added in v0.9.1

type CommandID uint64

CommandID is a command identifier

type CommandRequest added in v0.9.1

type CommandRequest struct {
	Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp,omitempty"`
	// Types that are valid to be assigned to Request:
	//	*CommandRequest_OpenSession
	//	*CommandRequest_KeepAlive
	//	*CommandRequest_CloseSession
	//	*CommandRequest_SessionCommand
	Request isCommandRequest_Request `protobuf_oneof:"request"`
}

func (*CommandRequest) Descriptor added in v0.9.1

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

func (*CommandRequest) GetCloseSession added in v0.9.1

func (m *CommandRequest) GetCloseSession() *CloseSessionRequest

func (*CommandRequest) GetKeepAlive added in v0.9.1

func (m *CommandRequest) GetKeepAlive() *KeepAliveRequest

func (*CommandRequest) GetOpenSession added in v0.9.1

func (m *CommandRequest) GetOpenSession() *OpenSessionRequest

func (*CommandRequest) GetRequest added in v0.9.1

func (m *CommandRequest) GetRequest() isCommandRequest_Request

func (*CommandRequest) GetSessionCommand added in v0.9.1

func (m *CommandRequest) GetSessionCommand() *SessionCommandRequest

func (*CommandRequest) GetTimestamp added in v0.9.1

func (m *CommandRequest) GetTimestamp() *time.Time

func (*CommandRequest) Marshal added in v0.9.1

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

func (*CommandRequest) MarshalTo added in v0.9.1

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

func (*CommandRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandRequest) ProtoMessage added in v0.9.1

func (*CommandRequest) ProtoMessage()

func (*CommandRequest) Reset added in v0.9.1

func (m *CommandRequest) Reset()

func (*CommandRequest) Size added in v0.9.1

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

func (*CommandRequest) String added in v0.9.1

func (m *CommandRequest) String() string

func (*CommandRequest) Unmarshal added in v0.9.1

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

func (*CommandRequest) XXX_DiscardUnknown added in v0.9.1

func (m *CommandRequest) XXX_DiscardUnknown()

func (*CommandRequest) XXX_Marshal added in v0.9.1

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

func (*CommandRequest) XXX_Merge added in v0.9.1

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

func (*CommandRequest) XXX_OneofWrappers added in v0.9.1

func (*CommandRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*CommandRequest) XXX_Size added in v0.9.1

func (m *CommandRequest) XXX_Size() int

func (*CommandRequest) XXX_Unmarshal added in v0.9.1

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

type CommandRequest_CloseSession added in v0.9.1

type CommandRequest_CloseSession struct {
	CloseSession *CloseSessionRequest `protobuf:"bytes,4,opt,name=close_session,json=closeSession,proto3,oneof" json:"close_session,omitempty"`
}

func (*CommandRequest_CloseSession) MarshalTo added in v0.9.1

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

func (*CommandRequest_CloseSession) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandRequest_CloseSession) Size added in v0.9.1

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

type CommandRequest_KeepAlive added in v0.9.1

type CommandRequest_KeepAlive struct {
	KeepAlive *KeepAliveRequest `protobuf:"bytes,3,opt,name=keep_alive,json=keepAlive,proto3,oneof" json:"keep_alive,omitempty"`
}

func (*CommandRequest_KeepAlive) MarshalTo added in v0.9.1

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

func (*CommandRequest_KeepAlive) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandRequest_KeepAlive) Size added in v0.9.1

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

type CommandRequest_OpenSession added in v0.9.1

type CommandRequest_OpenSession struct {
	OpenSession *OpenSessionRequest `protobuf:"bytes,2,opt,name=open_session,json=openSession,proto3,oneof" json:"open_session,omitempty"`
}

func (*CommandRequest_OpenSession) MarshalTo added in v0.9.1

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

func (*CommandRequest_OpenSession) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandRequest_OpenSession) Size added in v0.9.1

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

type CommandRequest_SessionCommand added in v0.9.1

type CommandRequest_SessionCommand struct {
	SessionCommand *SessionCommandRequest `protobuf:"bytes,5,opt,name=session_command,json=sessionCommand,proto3,oneof" json:"session_command,omitempty"`
}

func (*CommandRequest_SessionCommand) MarshalTo added in v0.9.1

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

func (*CommandRequest_SessionCommand) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandRequest_SessionCommand) Size added in v0.9.1

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

type CommandResponse added in v0.9.1

type CommandResponse struct {
	Index Index `protobuf:"varint,1,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	// Types that are valid to be assigned to Response:
	//	*CommandResponse_OpenSession
	//	*CommandResponse_KeepAlive
	//	*CommandResponse_CloseSession
	//	*CommandResponse_SessionCommand
	Response isCommandResponse_Response `protobuf_oneof:"response"`
}

func (*CommandResponse) Descriptor added in v0.9.1

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

func (*CommandResponse) GetCloseSession added in v0.9.1

func (m *CommandResponse) GetCloseSession() *CloseSessionResponse

func (*CommandResponse) GetIndex added in v0.9.1

func (m *CommandResponse) GetIndex() Index

func (*CommandResponse) GetKeepAlive added in v0.9.1

func (m *CommandResponse) GetKeepAlive() *KeepAliveResponse

func (*CommandResponse) GetOpenSession added in v0.9.1

func (m *CommandResponse) GetOpenSession() *OpenSessionResponse

func (*CommandResponse) GetResponse added in v0.9.1

func (m *CommandResponse) GetResponse() isCommandResponse_Response

func (*CommandResponse) GetSessionCommand added in v0.9.1

func (m *CommandResponse) GetSessionCommand() *SessionCommandResponse

func (*CommandResponse) Marshal added in v0.9.1

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

func (*CommandResponse) MarshalTo added in v0.9.1

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

func (*CommandResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandResponse) ProtoMessage added in v0.9.1

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) Reset added in v0.9.1

func (m *CommandResponse) Reset()

func (*CommandResponse) Size added in v0.9.1

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

func (*CommandResponse) String added in v0.9.1

func (m *CommandResponse) String() string

func (*CommandResponse) Unmarshal added in v0.9.1

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

func (*CommandResponse) XXX_DiscardUnknown added in v0.9.1

func (m *CommandResponse) XXX_DiscardUnknown()

func (*CommandResponse) XXX_Marshal added in v0.9.1

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

func (*CommandResponse) XXX_Merge added in v0.9.1

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

func (*CommandResponse) XXX_OneofWrappers added in v0.9.1

func (*CommandResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*CommandResponse) XXX_Size added in v0.9.1

func (m *CommandResponse) XXX_Size() int

func (*CommandResponse) XXX_Unmarshal added in v0.9.1

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

type CommandResponse_CloseSession added in v0.9.1

type CommandResponse_CloseSession struct {
	CloseSession *CloseSessionResponse `protobuf:"bytes,4,opt,name=close_session,json=closeSession,proto3,oneof" json:"close_session,omitempty"`
}

func (*CommandResponse_CloseSession) MarshalTo added in v0.9.1

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

func (*CommandResponse_CloseSession) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandResponse_CloseSession) Size added in v0.9.1

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

type CommandResponse_KeepAlive added in v0.9.1

type CommandResponse_KeepAlive struct {
	KeepAlive *KeepAliveResponse `protobuf:"bytes,3,opt,name=keep_alive,json=keepAlive,proto3,oneof" json:"keep_alive,omitempty"`
}

func (*CommandResponse_KeepAlive) MarshalTo added in v0.9.1

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

func (*CommandResponse_KeepAlive) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandResponse_KeepAlive) Size added in v0.9.1

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

type CommandResponse_OpenSession added in v0.9.1

type CommandResponse_OpenSession struct {
	OpenSession *OpenSessionResponse `protobuf:"bytes,2,opt,name=open_session,json=openSession,proto3,oneof" json:"open_session,omitempty"`
}

func (*CommandResponse_OpenSession) MarshalTo added in v0.9.1

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

func (*CommandResponse_OpenSession) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandResponse_OpenSession) Size added in v0.9.1

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

type CommandResponse_SessionCommand added in v0.9.1

type CommandResponse_SessionCommand struct {
	SessionCommand *SessionCommandResponse `protobuf:"bytes,5,opt,name=session_command,json=sessionCommand,proto3,oneof" json:"session_command,omitempty"`
}

func (*CommandResponse_SessionCommand) MarshalTo added in v0.9.1

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

func (*CommandResponse_SessionCommand) MarshalToSizedBuffer added in v0.9.1

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

func (*CommandResponse_SessionCommand) Size added in v0.9.1

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

type CommandState added in v0.9.1

type CommandState int
const (
	CommandPending CommandState = iota
	CommandRunning
	CommandComplete
)

type Commands added in v0.9.1

type Commands interface {
	// Get gets a command by ID
	Get(CommandID) (Command, bool)
	// List lists all open commands
	List(OperationID) []Command
}

Commands provides access to pending commands

type CreateServiceRequest added in v0.9.1

type CreateServiceRequest struct {
	ServiceInfo `protobuf:"bytes,1,opt,name=info,proto3,embedded=info" json:"info"`
}

func (*CreateServiceRequest) Descriptor added in v0.9.1

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

func (*CreateServiceRequest) Marshal added in v0.9.1

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

func (*CreateServiceRequest) MarshalTo added in v0.9.1

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

func (*CreateServiceRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*CreateServiceRequest) ProtoMessage added in v0.9.1

func (*CreateServiceRequest) ProtoMessage()

func (*CreateServiceRequest) Reset added in v0.9.1

func (m *CreateServiceRequest) Reset()

func (*CreateServiceRequest) Size added in v0.9.1

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

func (*CreateServiceRequest) String added in v0.9.1

func (m *CreateServiceRequest) String() string

func (*CreateServiceRequest) Unmarshal added in v0.9.1

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

func (*CreateServiceRequest) XXX_DiscardUnknown added in v0.9.1

func (m *CreateServiceRequest) XXX_DiscardUnknown()

func (*CreateServiceRequest) XXX_Marshal added in v0.9.1

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

func (*CreateServiceRequest) XXX_Merge added in v0.9.1

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

func (*CreateServiceRequest) XXX_Size added in v0.9.1

func (m *CreateServiceRequest) XXX_Size() int

func (*CreateServiceRequest) XXX_Unmarshal added in v0.9.1

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

type CreateServiceResponse added in v0.9.1

type CreateServiceResponse struct {
	ServiceID ServiceID `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3,casttype=ServiceID" json:"service_id,omitempty"`
}

func (*CreateServiceResponse) Descriptor added in v0.9.1

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

func (*CreateServiceResponse) GetServiceID added in v0.9.1

func (m *CreateServiceResponse) GetServiceID() ServiceID

func (*CreateServiceResponse) Marshal added in v0.9.1

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

func (*CreateServiceResponse) MarshalTo added in v0.9.1

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

func (*CreateServiceResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*CreateServiceResponse) ProtoMessage added in v0.9.1

func (*CreateServiceResponse) ProtoMessage()

func (*CreateServiceResponse) Reset added in v0.9.1

func (m *CreateServiceResponse) Reset()

func (*CreateServiceResponse) Size added in v0.9.1

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

func (*CreateServiceResponse) String added in v0.9.1

func (m *CreateServiceResponse) String() string

func (*CreateServiceResponse) Unmarshal added in v0.9.1

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

func (*CreateServiceResponse) XXX_DiscardUnknown added in v0.9.1

func (m *CreateServiceResponse) XXX_DiscardUnknown()

func (*CreateServiceResponse) XXX_Marshal added in v0.9.1

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

func (*CreateServiceResponse) XXX_Merge added in v0.9.1

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

func (*CreateServiceResponse) XXX_Size added in v0.9.1

func (m *CreateServiceResponse) XXX_Size() int

func (*CreateServiceResponse) XXX_Unmarshal added in v0.9.1

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

type Index

type Index uint64

Index is a service index

type KeepAliveRequest

type KeepAliveRequest struct {
	SessionID         SessionID                `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
	LastRequestID     RequestID                `protobuf:"varint,2,opt,name=last_request_id,json=lastRequestId,proto3,casttype=RequestID" json:"last_request_id,omitempty"`
	OpenRequests      []byte                   `protobuf:"bytes,3,opt,name=open_requests,json=openRequests,proto3" json:"open_requests,omitempty"`
	CompleteResponses map[RequestID]ResponseID `` /* 241-byte string literal not displayed */
}

func (*KeepAliveRequest) Descriptor

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

func (*KeepAliveRequest) GetCompleteResponses added in v0.10.5

func (m *KeepAliveRequest) GetCompleteResponses() map[RequestID]ResponseID

func (*KeepAliveRequest) GetLastRequestID added in v0.9.1

func (m *KeepAliveRequest) GetLastRequestID() RequestID

func (*KeepAliveRequest) GetOpenRequests added in v0.10.5

func (m *KeepAliveRequest) GetOpenRequests() []byte

func (*KeepAliveRequest) GetSessionID

func (m *KeepAliveRequest) GetSessionID() SessionID

func (*KeepAliveRequest) Marshal

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

func (*KeepAliveRequest) MarshalTo

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

func (*KeepAliveRequest) MarshalToSizedBuffer

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

func (*KeepAliveRequest) ProtoMessage

func (*KeepAliveRequest) ProtoMessage()

func (*KeepAliveRequest) Reset

func (m *KeepAliveRequest) Reset()

func (*KeepAliveRequest) Size

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

func (*KeepAliveRequest) String

func (m *KeepAliveRequest) String() string

func (*KeepAliveRequest) Unmarshal

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

func (*KeepAliveRequest) XXX_DiscardUnknown

func (m *KeepAliveRequest) XXX_DiscardUnknown()

func (*KeepAliveRequest) XXX_Marshal

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

func (*KeepAliveRequest) XXX_Merge

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

func (*KeepAliveRequest) XXX_Size

func (m *KeepAliveRequest) XXX_Size() int

func (*KeepAliveRequest) XXX_Unmarshal

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

type KeepAliveResponse

type KeepAliveResponse struct {
}

func (*KeepAliveResponse) Descriptor

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

func (*KeepAliveResponse) Marshal

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

func (*KeepAliveResponse) MarshalTo

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

func (*KeepAliveResponse) MarshalToSizedBuffer

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

func (*KeepAliveResponse) ProtoMessage

func (*KeepAliveResponse) ProtoMessage()

func (*KeepAliveResponse) Reset

func (m *KeepAliveResponse) Reset()

func (*KeepAliveResponse) Size

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

func (*KeepAliveResponse) String

func (m *KeepAliveResponse) String() string

func (*KeepAliveResponse) Unmarshal

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

func (*KeepAliveResponse) XXX_DiscardUnknown

func (m *KeepAliveResponse) XXX_DiscardUnknown()

func (*KeepAliveResponse) XXX_Marshal

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

func (*KeepAliveResponse) XXX_Merge

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

func (*KeepAliveResponse) XXX_Size

func (m *KeepAliveResponse) XXX_Size() int

func (*KeepAliveResponse) XXX_Unmarshal

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

type NewServiceFunc

type NewServiceFunc func(context ServiceContext) Service

NewServiceFunc is a function for creating a primitive service

type Node

type Node struct {
	Cluster cluster.Cluster
	// contains filtered or unexported fields
}

Node is an Atomix node

func NewNode

func NewNode(cluster cluster.Cluster, protocol Protocol) *Node

NewNode creates a new node running the given protocol

func (*Node) RegisterService

func (n *Node) RegisterService(t ServiceType, f NewServiceFunc)

RegisterService registers a primitive service

func (*Node) Start

func (n *Node) Start() error

Start starts the node

func (*Node) Stop

func (n *Node) Stop() error

Stop stops the node

type OpenSessionRequest

type OpenSessionRequest struct {
	Timeout time.Duration `protobuf:"bytes,1,opt,name=timeout,proto3,stdduration" json:"timeout"`
}

func (*OpenSessionRequest) Descriptor

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

func (*OpenSessionRequest) GetTimeout

func (m *OpenSessionRequest) GetTimeout() time.Duration

func (*OpenSessionRequest) Marshal

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

func (*OpenSessionRequest) MarshalTo

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

func (*OpenSessionRequest) MarshalToSizedBuffer

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

func (*OpenSessionRequest) ProtoMessage

func (*OpenSessionRequest) ProtoMessage()

func (*OpenSessionRequest) Reset

func (m *OpenSessionRequest) Reset()

func (*OpenSessionRequest) Size

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

func (*OpenSessionRequest) String

func (m *OpenSessionRequest) String() string

func (*OpenSessionRequest) Unmarshal

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

func (*OpenSessionRequest) XXX_DiscardUnknown

func (m *OpenSessionRequest) XXX_DiscardUnknown()

func (*OpenSessionRequest) XXX_Marshal

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

func (*OpenSessionRequest) XXX_Merge

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

func (*OpenSessionRequest) XXX_Size

func (m *OpenSessionRequest) XXX_Size() int

func (*OpenSessionRequest) XXX_Unmarshal

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

type OpenSessionResponse

type OpenSessionResponse struct {
	SessionID SessionID `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
}

func (*OpenSessionResponse) Descriptor

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

func (*OpenSessionResponse) GetSessionID

func (m *OpenSessionResponse) GetSessionID() SessionID

func (*OpenSessionResponse) Marshal

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

func (*OpenSessionResponse) MarshalTo

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

func (*OpenSessionResponse) MarshalToSizedBuffer

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

func (*OpenSessionResponse) ProtoMessage

func (*OpenSessionResponse) ProtoMessage()

func (*OpenSessionResponse) Reset

func (m *OpenSessionResponse) Reset()

func (*OpenSessionResponse) Size

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

func (*OpenSessionResponse) String

func (m *OpenSessionResponse) String() string

func (*OpenSessionResponse) Unmarshal

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

func (*OpenSessionResponse) XXX_DiscardUnknown

func (m *OpenSessionResponse) XXX_DiscardUnknown()

func (*OpenSessionResponse) XXX_Marshal

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

func (*OpenSessionResponse) XXX_Merge

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

func (*OpenSessionResponse) XXX_Size

func (m *OpenSessionResponse) XXX_Size() int

func (*OpenSessionResponse) XXX_Unmarshal

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

type Operation

type Operation interface {
	// OperationID returns the operation identifier
	OperationID() OperationID
	// Session returns the session executing the operation
	Session() Session
	// Input returns the operation input
	Input() []byte
	// Output returns the operation output
	Output([]byte, error)
	// Close closes the operation
	Close()
}

Operation is a command or query operation

type OperationID

type OperationID uint32

OperationID is an operation identifier

type OperationRequest added in v0.9.1

type OperationRequest struct {
	OperationID OperationID `protobuf:"varint,1,opt,name=operation_id,json=operationId,proto3,casttype=OperationID" json:"operation_id,omitempty"`
	Value       []byte      `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*OperationRequest) Descriptor added in v0.9.1

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

func (*OperationRequest) GetOperationID added in v0.9.1

func (m *OperationRequest) GetOperationID() OperationID

func (*OperationRequest) GetValue added in v0.9.1

func (m *OperationRequest) GetValue() []byte

func (*OperationRequest) Marshal added in v0.9.1

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

func (*OperationRequest) MarshalTo added in v0.9.1

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

func (*OperationRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*OperationRequest) ProtoMessage added in v0.9.1

func (*OperationRequest) ProtoMessage()

func (*OperationRequest) Reset added in v0.9.1

func (m *OperationRequest) Reset()

func (*OperationRequest) Size added in v0.9.1

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

func (*OperationRequest) String added in v0.9.1

func (m *OperationRequest) String() string

func (*OperationRequest) Unmarshal added in v0.9.1

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

func (*OperationRequest) XXX_DiscardUnknown added in v0.9.1

func (m *OperationRequest) XXX_DiscardUnknown()

func (*OperationRequest) XXX_Marshal added in v0.9.1

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

func (*OperationRequest) XXX_Merge added in v0.9.1

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

func (*OperationRequest) XXX_Size added in v0.9.1

func (m *OperationRequest) XXX_Size() int

func (*OperationRequest) XXX_Unmarshal added in v0.9.1

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

type OperationResponse added in v0.9.1

type OperationResponse struct {
	Status ResponseStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
	Value  []byte         `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*OperationResponse) Descriptor added in v0.9.1

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

func (*OperationResponse) GetStatus added in v0.9.1

func (m *OperationResponse) GetStatus() ResponseStatus

func (*OperationResponse) GetValue added in v0.9.1

func (m *OperationResponse) GetValue() []byte

func (*OperationResponse) Marshal added in v0.9.1

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

func (*OperationResponse) MarshalTo added in v0.9.1

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

func (*OperationResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*OperationResponse) ProtoMessage added in v0.9.1

func (*OperationResponse) ProtoMessage()

func (*OperationResponse) Reset added in v0.9.1

func (m *OperationResponse) Reset()

func (*OperationResponse) Size added in v0.9.1

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

func (*OperationResponse) String added in v0.9.1

func (m *OperationResponse) String() string

func (*OperationResponse) Unmarshal added in v0.9.1

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

func (*OperationResponse) XXX_DiscardUnknown added in v0.9.1

func (m *OperationResponse) XXX_DiscardUnknown()

func (*OperationResponse) XXX_Marshal added in v0.9.1

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

func (*OperationResponse) XXX_Merge added in v0.9.1

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

func (*OperationResponse) XXX_Size added in v0.9.1

func (m *OperationResponse) XXX_Size() int

func (*OperationResponse) XXX_Unmarshal added in v0.9.1

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

type Partition

type Partition interface {
	// MustLeader returns whether the client can only be used on the leader
	MustLeader() bool

	// IsLeader returns whether the client is the leader
	IsLeader() bool

	// Leader returns the current leader
	Leader() string

	// Followers returns the followers
	Followers() []string

	// WatchConfig watches the partition configuration for changes
	WatchConfig(ctx context.Context, ch chan<- PartitionConfig) error

	// SyncCommand executes a write request
	SyncCommand(ctx context.Context, input []byte, stream stream.WriteStream) error

	// SyncQuery executes a read request
	SyncQuery(ctx context.Context, input []byte, stream stream.WriteStream) error

	// StaleQuery executes a read request
	StaleQuery(ctx context.Context, input []byte, stream stream.WriteStream) error
}

Partition is the interface for a partition client

type PartitionCommandRequest added in v0.9.1

type PartitionCommandRequest struct {
	PartitionID PartitionID    `protobuf:"varint,1,opt,name=partition_id,json=partitionId,proto3,casttype=PartitionID" json:"partition_id,omitempty"`
	Request     CommandRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request"`
}

func (*PartitionCommandRequest) Descriptor added in v0.9.1

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

func (*PartitionCommandRequest) GetPartitionID added in v0.9.1

func (m *PartitionCommandRequest) GetPartitionID() PartitionID

func (*PartitionCommandRequest) GetRequest added in v0.9.1

func (m *PartitionCommandRequest) GetRequest() CommandRequest

func (*PartitionCommandRequest) Marshal added in v0.9.1

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

func (*PartitionCommandRequest) MarshalTo added in v0.9.1

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

func (*PartitionCommandRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionCommandRequest) ProtoMessage added in v0.9.1

func (*PartitionCommandRequest) ProtoMessage()

func (*PartitionCommandRequest) Reset added in v0.9.1

func (m *PartitionCommandRequest) Reset()

func (*PartitionCommandRequest) Size added in v0.9.1

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

func (*PartitionCommandRequest) String added in v0.9.1

func (m *PartitionCommandRequest) String() string

func (*PartitionCommandRequest) Unmarshal added in v0.9.1

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

func (*PartitionCommandRequest) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionCommandRequest) XXX_DiscardUnknown()

func (*PartitionCommandRequest) XXX_Marshal added in v0.9.1

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

func (*PartitionCommandRequest) XXX_Merge added in v0.9.1

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

func (*PartitionCommandRequest) XXX_Size added in v0.9.1

func (m *PartitionCommandRequest) XXX_Size() int

func (*PartitionCommandRequest) XXX_Unmarshal added in v0.9.1

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

type PartitionCommandResponse added in v0.9.1

type PartitionCommandResponse struct {
	Response CommandResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response"`
}

func (*PartitionCommandResponse) Descriptor added in v0.9.1

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

func (*PartitionCommandResponse) GetResponse added in v0.9.1

func (m *PartitionCommandResponse) GetResponse() CommandResponse

func (*PartitionCommandResponse) Marshal added in v0.9.1

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

func (*PartitionCommandResponse) MarshalTo added in v0.9.1

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

func (*PartitionCommandResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionCommandResponse) ProtoMessage added in v0.9.1

func (*PartitionCommandResponse) ProtoMessage()

func (*PartitionCommandResponse) Reset added in v0.9.1

func (m *PartitionCommandResponse) Reset()

func (*PartitionCommandResponse) Size added in v0.9.1

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

func (*PartitionCommandResponse) String added in v0.9.1

func (m *PartitionCommandResponse) String() string

func (*PartitionCommandResponse) Unmarshal added in v0.9.1

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

func (*PartitionCommandResponse) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionCommandResponse) XXX_DiscardUnknown()

func (*PartitionCommandResponse) XXX_Marshal added in v0.9.1

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

func (*PartitionCommandResponse) XXX_Merge added in v0.9.1

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

func (*PartitionCommandResponse) XXX_Size added in v0.9.1

func (m *PartitionCommandResponse) XXX_Size() int

func (*PartitionCommandResponse) XXX_Unmarshal added in v0.9.1

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

type PartitionConfig added in v0.9.1

type PartitionConfig struct {
	Leader    string
	Followers []string
}

PartitionConfig is the partition configuration

type PartitionConfigRequest added in v0.9.1

type PartitionConfigRequest struct {
	PartitionID PartitionID `protobuf:"varint,1,opt,name=partition_id,json=partitionId,proto3,casttype=PartitionID" json:"partition_id,omitempty"`
}

func (*PartitionConfigRequest) Descriptor added in v0.9.1

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

func (*PartitionConfigRequest) GetPartitionID added in v0.9.1

func (m *PartitionConfigRequest) GetPartitionID() PartitionID

func (*PartitionConfigRequest) Marshal added in v0.9.1

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

func (*PartitionConfigRequest) MarshalTo added in v0.9.1

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

func (*PartitionConfigRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionConfigRequest) ProtoMessage added in v0.9.1

func (*PartitionConfigRequest) ProtoMessage()

func (*PartitionConfigRequest) Reset added in v0.9.1

func (m *PartitionConfigRequest) Reset()

func (*PartitionConfigRequest) Size added in v0.9.1

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

func (*PartitionConfigRequest) String added in v0.9.1

func (m *PartitionConfigRequest) String() string

func (*PartitionConfigRequest) Unmarshal added in v0.9.1

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

func (*PartitionConfigRequest) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionConfigRequest) XXX_DiscardUnknown()

func (*PartitionConfigRequest) XXX_Marshal added in v0.9.1

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

func (*PartitionConfigRequest) XXX_Merge added in v0.9.1

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

func (*PartitionConfigRequest) XXX_Size added in v0.9.1

func (m *PartitionConfigRequest) XXX_Size() int

func (*PartitionConfigRequest) XXX_Unmarshal added in v0.9.1

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

type PartitionConfigResponse added in v0.9.1

type PartitionConfigResponse struct {
	Leader    string   `protobuf:"bytes,1,opt,name=leader,proto3" json:"leader,omitempty"`
	Followers []string `protobuf:"bytes,2,rep,name=followers,proto3" json:"followers,omitempty"`
}

func (*PartitionConfigResponse) Descriptor added in v0.9.1

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

func (*PartitionConfigResponse) GetFollowers added in v0.9.1

func (m *PartitionConfigResponse) GetFollowers() []string

func (*PartitionConfigResponse) GetLeader added in v0.9.1

func (m *PartitionConfigResponse) GetLeader() string

func (*PartitionConfigResponse) Marshal added in v0.9.1

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

func (*PartitionConfigResponse) MarshalTo added in v0.9.1

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

func (*PartitionConfigResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionConfigResponse) ProtoMessage added in v0.9.1

func (*PartitionConfigResponse) ProtoMessage()

func (*PartitionConfigResponse) Reset added in v0.9.1

func (m *PartitionConfigResponse) Reset()

func (*PartitionConfigResponse) Size added in v0.9.1

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

func (*PartitionConfigResponse) String added in v0.9.1

func (m *PartitionConfigResponse) String() string

func (*PartitionConfigResponse) Unmarshal added in v0.9.1

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

func (*PartitionConfigResponse) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionConfigResponse) XXX_DiscardUnknown()

func (*PartitionConfigResponse) XXX_Marshal added in v0.9.1

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

func (*PartitionConfigResponse) XXX_Merge added in v0.9.1

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

func (*PartitionConfigResponse) XXX_Size added in v0.9.1

func (m *PartitionConfigResponse) XXX_Size() int

func (*PartitionConfigResponse) XXX_Unmarshal added in v0.9.1

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

type PartitionID

type PartitionID uint32

PartitionID is a partition identifier

type PartitionQueryRequest added in v0.9.1

type PartitionQueryRequest struct {
	PartitionID PartitionID  `protobuf:"varint,1,opt,name=partition_id,json=partitionId,proto3,casttype=PartitionID" json:"partition_id,omitempty"`
	Request     QueryRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request"`
	Sync        bool         `protobuf:"varint,3,opt,name=sync,proto3" json:"sync,omitempty"`
}

func (*PartitionQueryRequest) Descriptor added in v0.9.1

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

func (*PartitionQueryRequest) GetPartitionID added in v0.9.1

func (m *PartitionQueryRequest) GetPartitionID() PartitionID

func (*PartitionQueryRequest) GetRequest added in v0.9.1

func (m *PartitionQueryRequest) GetRequest() QueryRequest

func (*PartitionQueryRequest) GetSync added in v0.9.1

func (m *PartitionQueryRequest) GetSync() bool

func (*PartitionQueryRequest) Marshal added in v0.9.1

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

func (*PartitionQueryRequest) MarshalTo added in v0.9.1

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

func (*PartitionQueryRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionQueryRequest) ProtoMessage added in v0.9.1

func (*PartitionQueryRequest) ProtoMessage()

func (*PartitionQueryRequest) Reset added in v0.9.1

func (m *PartitionQueryRequest) Reset()

func (*PartitionQueryRequest) Size added in v0.9.1

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

func (*PartitionQueryRequest) String added in v0.9.1

func (m *PartitionQueryRequest) String() string

func (*PartitionQueryRequest) Unmarshal added in v0.9.1

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

func (*PartitionQueryRequest) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionQueryRequest) XXX_DiscardUnknown()

func (*PartitionQueryRequest) XXX_Marshal added in v0.9.1

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

func (*PartitionQueryRequest) XXX_Merge added in v0.9.1

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

func (*PartitionQueryRequest) XXX_Size added in v0.9.1

func (m *PartitionQueryRequest) XXX_Size() int

func (*PartitionQueryRequest) XXX_Unmarshal added in v0.9.1

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

type PartitionQueryResponse added in v0.9.1

type PartitionQueryResponse struct {
	Response QueryResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response"`
}

func (*PartitionQueryResponse) Descriptor added in v0.9.1

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

func (*PartitionQueryResponse) GetResponse added in v0.9.1

func (m *PartitionQueryResponse) GetResponse() QueryResponse

func (*PartitionQueryResponse) Marshal added in v0.9.1

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

func (*PartitionQueryResponse) MarshalTo added in v0.9.1

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

func (*PartitionQueryResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*PartitionQueryResponse) ProtoMessage added in v0.9.1

func (*PartitionQueryResponse) ProtoMessage()

func (*PartitionQueryResponse) Reset added in v0.9.1

func (m *PartitionQueryResponse) Reset()

func (*PartitionQueryResponse) Size added in v0.9.1

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

func (*PartitionQueryResponse) String added in v0.9.1

func (m *PartitionQueryResponse) String() string

func (*PartitionQueryResponse) Unmarshal added in v0.9.1

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

func (*PartitionQueryResponse) XXX_DiscardUnknown added in v0.9.1

func (m *PartitionQueryResponse) XXX_DiscardUnknown()

func (*PartitionQueryResponse) XXX_Marshal added in v0.9.1

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

func (*PartitionQueryResponse) XXX_Merge added in v0.9.1

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

func (*PartitionQueryResponse) XXX_Size added in v0.9.1

func (m *PartitionQueryResponse) XXX_Size() int

func (*PartitionQueryResponse) XXX_Unmarshal added in v0.9.1

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

type PartitionServiceClient added in v0.9.1

PartitionServiceClient is the client API for PartitionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPartitionServiceClient added in v0.9.1

func NewPartitionServiceClient(cc *grpc.ClientConn) PartitionServiceClient

type PartitionServiceServer added in v0.9.1

PartitionServiceServer is the server API for PartitionService service.

type PartitionService_CommandStreamClient added in v0.9.1

type PartitionService_CommandStreamClient interface {
	Recv() (*PartitionCommandResponse, error)
	grpc.ClientStream
}

type PartitionService_CommandStreamServer added in v0.9.1

type PartitionService_CommandStreamServer interface {
	Send(*PartitionCommandResponse) error
	grpc.ServerStream
}

type PartitionService_QueryStreamClient added in v0.9.1

type PartitionService_QueryStreamClient interface {
	Recv() (*PartitionQueryResponse, error)
	grpc.ClientStream
}

type PartitionService_QueryStreamServer added in v0.9.1

type PartitionService_QueryStreamServer interface {
	Send(*PartitionQueryResponse) error
	grpc.ServerStream
}

type PartitionService_WatchConfigClient added in v0.9.1

type PartitionService_WatchConfigClient interface {
	Recv() (*PartitionConfigResponse, error)
	grpc.ClientStream
}

type PartitionService_WatchConfigServer added in v0.9.1

type PartitionService_WatchConfigServer interface {
	Send(*PartitionConfigResponse) error
	grpc.ServerStream
}

type Protocol

type Protocol interface {
	// Partition returns a partition
	Partition(partitionID PartitionID) Partition

	// Partitions returns the protocol partitions
	Partitions() []Partition

	// Start starts the protocol
	Start(cluster cluster.Cluster, registry *Registry) error

	// Stop stops the protocol
	Stop() error
}

Protocol is the interface to be implemented by replication protocols

type Query added in v0.9.1

type Query interface {
	Operation
}

Query is a query operation

type QueryRequest added in v0.9.1

type QueryRequest struct {
	LastIndex Index `protobuf:"varint,1,opt,name=last_index,json=lastIndex,proto3,casttype=Index" json:"last_index,omitempty"`
	// Types that are valid to be assigned to Request:
	//	*QueryRequest_SessionQuery
	Request isQueryRequest_Request `protobuf_oneof:"request"`
}

func (*QueryRequest) Descriptor added in v0.9.1

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

func (*QueryRequest) GetLastIndex added in v0.9.1

func (m *QueryRequest) GetLastIndex() Index

func (*QueryRequest) GetRequest added in v0.9.1

func (m *QueryRequest) GetRequest() isQueryRequest_Request

func (*QueryRequest) GetSessionQuery added in v0.9.1

func (m *QueryRequest) GetSessionQuery() *SessionQueryRequest

func (*QueryRequest) Marshal added in v0.9.1

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

func (*QueryRequest) MarshalTo added in v0.9.1

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

func (*QueryRequest) MarshalToSizedBuffer added in v0.9.1

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

func (*QueryRequest) ProtoMessage added in v0.9.1

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset added in v0.9.1

func (m *QueryRequest) Reset()

func (*QueryRequest) Size added in v0.9.1

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

func (*QueryRequest) String added in v0.9.1

func (m *QueryRequest) String() string

func (*QueryRequest) Unmarshal added in v0.9.1

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

func (*QueryRequest) XXX_DiscardUnknown added in v0.9.1

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal added in v0.9.1

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

func (*QueryRequest) XXX_Merge added in v0.9.1

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

func (*QueryRequest) XXX_OneofWrappers added in v0.9.1

func (*QueryRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryRequest) XXX_Size added in v0.9.1

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal added in v0.9.1

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

type QueryRequest_SessionQuery added in v0.9.1

type QueryRequest_SessionQuery struct {
	SessionQuery *SessionQueryRequest `protobuf:"bytes,2,opt,name=session_query,json=sessionQuery,proto3,oneof" json:"session_query,omitempty"`
}

func (*QueryRequest_SessionQuery) MarshalTo added in v0.9.1

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

func (*QueryRequest_SessionQuery) MarshalToSizedBuffer added in v0.9.1

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

func (*QueryRequest_SessionQuery) Size added in v0.9.1

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

type QueryResponse added in v0.9.1

type QueryResponse struct {
	// Types that are valid to be assigned to Response:
	//	*QueryResponse_SessionQuery
	Response isQueryResponse_Response `protobuf_oneof:"response"`
}

func (*QueryResponse) Descriptor added in v0.9.1

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

func (*QueryResponse) GetResponse added in v0.9.1

func (m *QueryResponse) GetResponse() isQueryResponse_Response

func (*QueryResponse) GetSessionQuery added in v0.9.1

func (m *QueryResponse) GetSessionQuery() *SessionQueryResponse

func (*QueryResponse) Marshal added in v0.9.1

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

func (*QueryResponse) MarshalTo added in v0.9.1

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

func (*QueryResponse) MarshalToSizedBuffer added in v0.9.1

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

func (*QueryResponse) ProtoMessage added in v0.9.1

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset added in v0.9.1

func (m *QueryResponse) Reset()

func (*QueryResponse) Size added in v0.9.1

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

func (*QueryResponse) String added in v0.9.1

func (m *QueryResponse) String() string

func (*QueryResponse) Unmarshal added in v0.9.1

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

func (*QueryResponse) XXX_DiscardUnknown added in v0.9.1

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal added in v0.9.1

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

func (*QueryResponse) XXX_Merge added in v0.9.1

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

func (*QueryResponse) XXX_OneofWrappers added in v0.9.1

func (*QueryResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryResponse) XXX_Size added in v0.9.1

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal added in v0.9.1

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

type QueryResponse_SessionQuery added in v0.9.1

type QueryResponse_SessionQuery struct {
	SessionQuery *SessionQueryResponse `protobuf:"bytes,1,opt,name=session_query,json=sessionQuery,proto3,oneof" json:"session_query,omitempty"`
}

func (*QueryResponse_SessionQuery) MarshalTo added in v0.9.1

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

func (*QueryResponse_SessionQuery) MarshalToSizedBuffer added in v0.9.1

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

func (*QueryResponse_SessionQuery) Size added in v0.9.1

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

type Registry

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

Registry is the default primitive registry

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new primitive registry

func (*Registry) GetService

func (r *Registry) GetService(primitiveType ServiceType) NewServiceFunc

func (*Registry) GetServices

func (r *Registry) GetServices() []NewServiceFunc

func (*Registry) Register

func (r *Registry) Register(primitiveType ServiceType, primitive NewServiceFunc)

type RequestID added in v0.9.1

type RequestID uint64

RequestID is a request identifier

type ResponseCode added in v0.9.1

type ResponseCode int32
const (
	ResponseCode_OK             ResponseCode = 0
	ResponseCode_ERROR          ResponseCode = 1
	ResponseCode_UNKNOWN        ResponseCode = 2
	ResponseCode_CANCELED       ResponseCode = 3
	ResponseCode_NOT_FOUND      ResponseCode = 4
	ResponseCode_ALREADY_EXISTS ResponseCode = 5
	ResponseCode_UNAUTHORIZED   ResponseCode = 6
	ResponseCode_FORBIDDEN      ResponseCode = 7
	ResponseCode_CONFLICT       ResponseCode = 8
	ResponseCode_INVALID        ResponseCode = 9
	ResponseCode_UNAVAILABLE    ResponseCode = 10
	ResponseCode_NOT_SUPPORTED  ResponseCode = 11
	ResponseCode_TIMEOUT        ResponseCode = 12
	ResponseCode_INTERNAL       ResponseCode = 13
)

func (ResponseCode) EnumDescriptor added in v0.9.1

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

func (ResponseCode) String added in v0.9.1

func (x ResponseCode) String() string

type ResponseID added in v0.9.1

type ResponseID uint64

ResponseID is a response identifier

type ResponseStatus added in v0.9.1

type ResponseStatus struct {
	Code    ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=atomix.service.ResponseCode" json:"code,omitempty"`
	Message string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

func (*ResponseStatus) Descriptor added in v0.9.1

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

func (*ResponseStatus) GetCode added in v0.9.1

func (m *ResponseStatus) GetCode() ResponseCode

func (*ResponseStatus) GetMessage added in v0.9.1

func (m *ResponseStatus) GetMessage() string

func (*ResponseStatus) Marshal added in v0.9.1

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

func (*ResponseStatus) MarshalTo added in v0.9.1

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

func (*ResponseStatus) MarshalToSizedBuffer added in v0.9.1

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

func (*ResponseStatus) ProtoMessage added in v0.9.1

func (*ResponseStatus) ProtoMessage()

func (*ResponseStatus) Reset added in v0.9.1

func (m *ResponseStatus) Reset()

func (*ResponseStatus) Size added in v0.9.1

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

func (*ResponseStatus) String added in v0.9.1

func (m *ResponseStatus) String() string

func (*ResponseStatus) Unmarshal added in v0.9.1

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

func (*ResponseStatus) XXX_DiscardUnknown added in v0.9.1

func (m *ResponseStatus) XXX_DiscardUnknown()

func (*ResponseStatus) XXX_Marshal added in v0.9.1

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

func (*ResponseStatus) XXX_Merge added in v0.9.1

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

func (*ResponseStatus) XXX_Size added in v0.9.1

func (m *ResponseStatus) XXX_Size() int

func (*ResponseStatus) XXX_Unmarshal added in v0.9.1

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

type RestoreService

type RestoreService interface {
	// Restore is called to restore the service state from a snapshot
	Restore(reader io.Reader) error
}

RestoreService is an interface for restoring up a service

type Scheduler

type Scheduler interface {
	// Time returns the current time
	Time() time.Time

	// Run executes a function asynchronously
	Run(f func())

	// RunAfter schedules a function to be run once after the given delay
	RunAfter(d time.Duration, f func()) Timer

	// RepeatAfter schedules a function to run repeatedly every interval starting after the given delay
	RepeatAfter(d time.Duration, i time.Duration, f func()) Timer

	// RunAt schedules a function to be run once after the given delay
	RunAt(t time.Time, f func()) Timer

	// RepeatAt schedules a function to run repeatedly every interval starting after the given delay
	RepeatAt(t time.Time, i time.Duration, f func()) Timer
	// contains filtered or unexported methods
}

Scheduler provides deterministic scheduling for a state machine

type Server

type Server struct {
	Protocol Protocol
}

Server is a base server for servers that support sessions

func (*Server) Command added in v0.9.1

func (*Server) CommandStream added in v0.9.1

func (*Server) GetConfig added in v0.9.1

func (*Server) Query added in v0.9.1

func (*Server) QueryStream added in v0.9.1

func (*Server) WatchConfig added in v0.9.1

func (s *Server) WatchConfig(request *PartitionConfigRequest, server PartitionService_WatchConfigServer) error

type Service

type Service interface {
	BackupService
	RestoreService
	ServiceContext
	// ExecuteCommand executes a service command
	ExecuteCommand(Command)
	// ExecuteQuery executes a service query
	ExecuteQuery(Query)
}

Service is a primitive service

type ServiceCommandRequest

type ServiceCommandRequest struct {
	ServiceID ServiceID         `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3,casttype=ServiceID" json:"service_id,omitempty"`
	RequestID RequestID         `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"`
	Operation *OperationRequest `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"`
}

func (*ServiceCommandRequest) Descriptor

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

func (*ServiceCommandRequest) GetOperation

func (m *ServiceCommandRequest) GetOperation() *OperationRequest

func (*ServiceCommandRequest) GetRequestID added in v0.9.1

func (m *ServiceCommandRequest) GetRequestID() RequestID

func (*ServiceCommandRequest) GetServiceID added in v0.9.1

func (m *ServiceCommandRequest) GetServiceID() ServiceID

func (*ServiceCommandRequest) Marshal

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

func (*ServiceCommandRequest) MarshalTo

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

func (*ServiceCommandRequest) MarshalToSizedBuffer

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

func (*ServiceCommandRequest) ProtoMessage

func (*ServiceCommandRequest) ProtoMessage()

func (*ServiceCommandRequest) Reset

func (m *ServiceCommandRequest) Reset()

func (*ServiceCommandRequest) Size

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

func (*ServiceCommandRequest) String

func (m *ServiceCommandRequest) String() string

func (*ServiceCommandRequest) Unmarshal

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

func (*ServiceCommandRequest) XXX_DiscardUnknown

func (m *ServiceCommandRequest) XXX_DiscardUnknown()

func (*ServiceCommandRequest) XXX_Marshal

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

func (*ServiceCommandRequest) XXX_Merge

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

func (*ServiceCommandRequest) XXX_Size

func (m *ServiceCommandRequest) XXX_Size() int

func (*ServiceCommandRequest) XXX_Unmarshal

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

type ServiceCommandResponse

type ServiceCommandResponse struct {
	ResponseID ResponseID         `protobuf:"varint,1,opt,name=response_id,json=responseId,proto3,casttype=ResponseID" json:"response_id,omitempty"`
	Operation  *OperationResponse `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
}

func (*ServiceCommandResponse) Descriptor

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

func (*ServiceCommandResponse) GetOperation

func (m *ServiceCommandResponse) GetOperation() *OperationResponse

func (*ServiceCommandResponse) GetResponseID added in v0.9.1

func (m *ServiceCommandResponse) GetResponseID() ResponseID

func (*ServiceCommandResponse) Marshal

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

func (*ServiceCommandResponse) MarshalTo

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

func (*ServiceCommandResponse) MarshalToSizedBuffer

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

func (*ServiceCommandResponse) ProtoMessage

func (*ServiceCommandResponse) ProtoMessage()

func (*ServiceCommandResponse) Reset

func (m *ServiceCommandResponse) Reset()

func (*ServiceCommandResponse) Size

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

func (*ServiceCommandResponse) String

func (m *ServiceCommandResponse) String() string

func (*ServiceCommandResponse) Unmarshal

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

func (*ServiceCommandResponse) XXX_DiscardUnknown

func (m *ServiceCommandResponse) XXX_DiscardUnknown()

func (*ServiceCommandResponse) XXX_Marshal

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

func (*ServiceCommandResponse) XXX_Merge

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

func (*ServiceCommandResponse) XXX_Size

func (m *ServiceCommandResponse) XXX_Size() int

func (*ServiceCommandResponse) XXX_Unmarshal

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

type ServiceContext

type ServiceContext interface {
	// ID returns the service identifier
	ID() ServiceID
	// Type returns the service type
	Type() ServiceType
	// Namespace returns the service namespace
	Namespace() string
	// Name returns the service name
	Name() string
	// Index returns the current service index
	Index() Index
	// Time returns the current service time
	Time() time.Time
	// Scheduler returns the service scheduler
	Scheduler() Scheduler
	// Sessions returns the open sessions
	Sessions() Sessions
	// Commands returns the pending commands
	Commands() Commands
}

ServiceContext is a service context

type ServiceID

type ServiceID uint64

ServiceID is a service identifier

type ServiceInfo added in v0.9.1

type ServiceInfo struct {
	Type      ServiceType `protobuf:"bytes,1,opt,name=type,proto3,casttype=ServiceType" json:"type,omitempty"`
	Namespace string      `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string      `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}

func (*ServiceInfo) Descriptor added in v0.9.1

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

func (*ServiceInfo) GetName added in v0.9.1

func (m *ServiceInfo) GetName() string

func (*ServiceInfo) GetNamespace added in v0.9.1

func (m *ServiceInfo) GetNamespace() string

func (*ServiceInfo) GetType added in v0.9.1

func (m *ServiceInfo) GetType() ServiceType

func (*ServiceInfo) Marshal added in v0.9.1

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

func (*ServiceInfo) MarshalTo added in v0.9.1

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

func (*ServiceInfo) MarshalToSizedBuffer added in v0.9.1

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

func (*ServiceInfo) ProtoMessage added in v0.9.1

func (*ServiceInfo) ProtoMessage()

func (*ServiceInfo) Reset added in v0.9.1

func (m *ServiceInfo) Reset()

func (*ServiceInfo) Size added in v0.9.1

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

func (*ServiceInfo) String added in v0.9.1

func (m *ServiceInfo) String() string

func (*ServiceInfo) Unmarshal added in v0.9.1

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

func (*ServiceInfo) XXX_DiscardUnknown added in v0.9.1

func (m *ServiceInfo) XXX_DiscardUnknown()

func (*ServiceInfo) XXX_Marshal added in v0.9.1

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

func (*ServiceInfo) XXX_Merge added in v0.9.1

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

func (*ServiceInfo) XXX_Size added in v0.9.1

func (m *ServiceInfo) XXX_Size() int

func (*ServiceInfo) XXX_Unmarshal added in v0.9.1

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

type ServiceQueryRequest

type ServiceQueryRequest struct {
	ServiceID ServiceID         `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3,casttype=ServiceID" json:"service_id,omitempty"`
	Operation *OperationRequest `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
}

func (*ServiceQueryRequest) Descriptor

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

func (*ServiceQueryRequest) GetOperation

func (m *ServiceQueryRequest) GetOperation() *OperationRequest

func (*ServiceQueryRequest) GetServiceID added in v0.9.1

func (m *ServiceQueryRequest) GetServiceID() ServiceID

func (*ServiceQueryRequest) Marshal

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

func (*ServiceQueryRequest) MarshalTo

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

func (*ServiceQueryRequest) MarshalToSizedBuffer

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

func (*ServiceQueryRequest) ProtoMessage

func (*ServiceQueryRequest) ProtoMessage()

func (*ServiceQueryRequest) Reset

func (m *ServiceQueryRequest) Reset()

func (*ServiceQueryRequest) Size

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

func (*ServiceQueryRequest) String

func (m *ServiceQueryRequest) String() string

func (*ServiceQueryRequest) Unmarshal

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

func (*ServiceQueryRequest) XXX_DiscardUnknown

func (m *ServiceQueryRequest) XXX_DiscardUnknown()

func (*ServiceQueryRequest) XXX_Marshal

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

func (*ServiceQueryRequest) XXX_Merge

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

func (*ServiceQueryRequest) XXX_Size

func (m *ServiceQueryRequest) XXX_Size() int

func (*ServiceQueryRequest) XXX_Unmarshal

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

type ServiceQueryResponse

type ServiceQueryResponse struct {
	ResponseID ResponseID         `protobuf:"varint,1,opt,name=response_id,json=responseId,proto3,casttype=ResponseID" json:"response_id,omitempty"`
	Operation  *OperationResponse `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
}

func (*ServiceQueryResponse) Descriptor

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

func (*ServiceQueryResponse) GetOperation

func (m *ServiceQueryResponse) GetOperation() *OperationResponse

func (*ServiceQueryResponse) GetResponseID added in v0.9.1

func (m *ServiceQueryResponse) GetResponseID() ResponseID

func (*ServiceQueryResponse) Marshal

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

func (*ServiceQueryResponse) MarshalTo

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

func (*ServiceQueryResponse) MarshalToSizedBuffer

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

func (*ServiceQueryResponse) ProtoMessage

func (*ServiceQueryResponse) ProtoMessage()

func (*ServiceQueryResponse) Reset

func (m *ServiceQueryResponse) Reset()

func (*ServiceQueryResponse) Size

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

func (*ServiceQueryResponse) String

func (m *ServiceQueryResponse) String() string

func (*ServiceQueryResponse) Unmarshal

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

func (*ServiceQueryResponse) XXX_DiscardUnknown

func (m *ServiceQueryResponse) XXX_DiscardUnknown()

func (*ServiceQueryResponse) XXX_Marshal

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

func (*ServiceQueryResponse) XXX_Merge

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

func (*ServiceQueryResponse) XXX_Size

func (m *ServiceQueryResponse) XXX_Size() int

func (*ServiceQueryResponse) XXX_Unmarshal

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

type ServiceSessionSnapshot added in v0.9.1

type ServiceSessionSnapshot struct {
	SessionID SessionID                 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
	Commands  []*SessionCommandSnapshot `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"`
}

func (*ServiceSessionSnapshot) Descriptor added in v0.9.1

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

func (*ServiceSessionSnapshot) GetCommands added in v0.9.1

func (m *ServiceSessionSnapshot) GetCommands() []*SessionCommandSnapshot

func (*ServiceSessionSnapshot) GetSessionID added in v0.9.1

func (m *ServiceSessionSnapshot) GetSessionID() SessionID

func (*ServiceSessionSnapshot) Marshal added in v0.9.1

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

func (*ServiceSessionSnapshot) MarshalTo added in v0.9.1

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

func (*ServiceSessionSnapshot) MarshalToSizedBuffer added in v0.9.1

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

func (*ServiceSessionSnapshot) ProtoMessage added in v0.9.1

func (*ServiceSessionSnapshot) ProtoMessage()

func (*ServiceSessionSnapshot) Reset added in v0.9.1

func (m *ServiceSessionSnapshot) Reset()

func (*ServiceSessionSnapshot) Size added in v0.9.1

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

func (*ServiceSessionSnapshot) String added in v0.9.1

func (m *ServiceSessionSnapshot) String() string

func (*ServiceSessionSnapshot) Unmarshal added in v0.9.1

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

func (*ServiceSessionSnapshot) XXX_DiscardUnknown added in v0.9.1

func (m *ServiceSessionSnapshot) XXX_DiscardUnknown()

func (*ServiceSessionSnapshot) XXX_Marshal added in v0.9.1

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

func (*ServiceSessionSnapshot) XXX_Merge added in v0.9.1

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

func (*ServiceSessionSnapshot) XXX_Size added in v0.9.1

func (m *ServiceSessionSnapshot) XXX_Size() int

func (*ServiceSessionSnapshot) XXX_Unmarshal added in v0.9.1

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

type ServiceSnapshot added in v0.7.0

type ServiceSnapshot struct {
	ServiceID   ServiceID `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3,casttype=ServiceID" json:"service_id,omitempty"`
	ServiceInfo `protobuf:"bytes,2,opt,name=service_info,json=serviceInfo,proto3,embedded=service_info" json:"service_info"`
	Data        []byte                    `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Sessions    []*ServiceSessionSnapshot `protobuf:"bytes,4,rep,name=sessions,proto3" json:"sessions,omitempty"`
}

func (*ServiceSnapshot) Descriptor added in v0.7.0

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

func (*ServiceSnapshot) GetData added in v0.7.0

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

func (*ServiceSnapshot) GetServiceID added in v0.7.0

func (m *ServiceSnapshot) GetServiceID() ServiceID

func (*ServiceSnapshot) GetSessions added in v0.9.1

func (m *ServiceSnapshot) GetSessions() []*ServiceSessionSnapshot

func (*ServiceSnapshot) Marshal added in v0.7.0

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

func (*ServiceSnapshot) MarshalTo added in v0.7.0

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

func (*ServiceSnapshot) MarshalToSizedBuffer added in v0.7.0

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

func (*ServiceSnapshot) ProtoMessage added in v0.7.0

func (*ServiceSnapshot) ProtoMessage()

func (*ServiceSnapshot) Reset added in v0.7.0

func (m *ServiceSnapshot) Reset()

func (*ServiceSnapshot) Size added in v0.7.0

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

func (*ServiceSnapshot) String added in v0.7.0

func (m *ServiceSnapshot) String() string

func (*ServiceSnapshot) Unmarshal added in v0.7.0

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

func (*ServiceSnapshot) XXX_DiscardUnknown added in v0.7.0

func (m *ServiceSnapshot) XXX_DiscardUnknown()

func (*ServiceSnapshot) XXX_Marshal added in v0.7.0

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

func (*ServiceSnapshot) XXX_Merge added in v0.7.0

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

func (*ServiceSnapshot) XXX_Size added in v0.7.0

func (m *ServiceSnapshot) XXX_Size() int

func (*ServiceSnapshot) XXX_Unmarshal added in v0.7.0

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

type ServiceType added in v0.9.1

type ServiceType string

ServiceType is a service type name

type Session

type Session interface {
	// ID returns the session identifier
	ID() SessionID
	// State returns the current session state
	State() SessionState
	// Watch watches the session state
	Watch(f func(SessionState)) Watcher
	// Commands returns the session commands
	Commands() Commands
}

Session is a service session

type SessionCommandRequest

type SessionCommandRequest struct {
	SessionID SessionID `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
	// Types that are valid to be assigned to Request:
	//	*SessionCommandRequest_CreateService
	//	*SessionCommandRequest_CloseService
	//	*SessionCommandRequest_ServiceCommand
	Request isSessionCommandRequest_Request `protobuf_oneof:"request"`
}

func (*SessionCommandRequest) Descriptor

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

func (*SessionCommandRequest) GetCloseService added in v0.9.1

func (m *SessionCommandRequest) GetCloseService() *CloseServiceRequest

func (*SessionCommandRequest) GetCreateService added in v0.9.1

func (m *SessionCommandRequest) GetCreateService() *CreateServiceRequest

func (*SessionCommandRequest) GetRequest added in v0.9.1

func (m *SessionCommandRequest) GetRequest() isSessionCommandRequest_Request

func (*SessionCommandRequest) GetServiceCommand added in v0.9.1

func (m *SessionCommandRequest) GetServiceCommand() *ServiceCommandRequest

func (*SessionCommandRequest) GetSessionID added in v0.9.1

func (m *SessionCommandRequest) GetSessionID() SessionID

func (*SessionCommandRequest) Marshal

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

func (*SessionCommandRequest) MarshalTo

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

func (*SessionCommandRequest) MarshalToSizedBuffer

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

func (*SessionCommandRequest) ProtoMessage

func (*SessionCommandRequest) ProtoMessage()

func (*SessionCommandRequest) Reset

func (m *SessionCommandRequest) Reset()

func (*SessionCommandRequest) Size

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

func (*SessionCommandRequest) String

func (m *SessionCommandRequest) String() string

func (*SessionCommandRequest) Unmarshal

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

func (*SessionCommandRequest) XXX_DiscardUnknown

func (m *SessionCommandRequest) XXX_DiscardUnknown()

func (*SessionCommandRequest) XXX_Marshal

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

func (*SessionCommandRequest) XXX_Merge

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

func (*SessionCommandRequest) XXX_OneofWrappers added in v0.9.1

func (*SessionCommandRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionCommandRequest) XXX_Size

func (m *SessionCommandRequest) XXX_Size() int

func (*SessionCommandRequest) XXX_Unmarshal

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

type SessionCommandRequest_CloseService added in v0.9.1

type SessionCommandRequest_CloseService struct {
	CloseService *CloseServiceRequest `protobuf:"bytes,3,opt,name=close_service,json=closeService,proto3,oneof" json:"close_service,omitempty"`
}

func (*SessionCommandRequest_CloseService) MarshalTo added in v0.9.1

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

func (*SessionCommandRequest_CloseService) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandRequest_CloseService) Size added in v0.9.1

type SessionCommandRequest_CreateService added in v0.9.1

type SessionCommandRequest_CreateService struct {
	CreateService *CreateServiceRequest `protobuf:"bytes,2,opt,name=create_service,json=createService,proto3,oneof" json:"create_service,omitempty"`
}

func (*SessionCommandRequest_CreateService) MarshalTo added in v0.9.1

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

func (*SessionCommandRequest_CreateService) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandRequest_CreateService) Size added in v0.9.1

type SessionCommandRequest_ServiceCommand added in v0.9.1

type SessionCommandRequest_ServiceCommand struct {
	ServiceCommand *ServiceCommandRequest `protobuf:"bytes,4,opt,name=service_command,json=serviceCommand,proto3,oneof" json:"service_command,omitempty"`
}

func (*SessionCommandRequest_ServiceCommand) MarshalTo added in v0.9.1

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

func (*SessionCommandRequest_ServiceCommand) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandRequest_ServiceCommand) Size added in v0.9.1

type SessionCommandResponse

type SessionCommandResponse struct {
	// Types that are valid to be assigned to Response:
	//	*SessionCommandResponse_CreateService
	//	*SessionCommandResponse_CloseService
	//	*SessionCommandResponse_ServiceCommand
	Response isSessionCommandResponse_Response `protobuf_oneof:"response"`
}

func (*SessionCommandResponse) Descriptor

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

func (*SessionCommandResponse) GetCloseService added in v0.9.1

func (m *SessionCommandResponse) GetCloseService() *CloseServiceResponse

func (*SessionCommandResponse) GetCreateService added in v0.9.1

func (m *SessionCommandResponse) GetCreateService() *CreateServiceResponse

func (*SessionCommandResponse) GetResponse

func (m *SessionCommandResponse) GetResponse() isSessionCommandResponse_Response

func (*SessionCommandResponse) GetServiceCommand added in v0.9.1

func (m *SessionCommandResponse) GetServiceCommand() *ServiceCommandResponse

func (*SessionCommandResponse) Marshal

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

func (*SessionCommandResponse) MarshalTo

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

func (*SessionCommandResponse) MarshalToSizedBuffer

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

func (*SessionCommandResponse) ProtoMessage

func (*SessionCommandResponse) ProtoMessage()

func (*SessionCommandResponse) Reset

func (m *SessionCommandResponse) Reset()

func (*SessionCommandResponse) Size

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

func (*SessionCommandResponse) String

func (m *SessionCommandResponse) String() string

func (*SessionCommandResponse) Unmarshal

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

func (*SessionCommandResponse) XXX_DiscardUnknown

func (m *SessionCommandResponse) XXX_DiscardUnknown()

func (*SessionCommandResponse) XXX_Marshal

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

func (*SessionCommandResponse) XXX_Merge

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

func (*SessionCommandResponse) XXX_OneofWrappers added in v0.9.1

func (*SessionCommandResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionCommandResponse) XXX_Size

func (m *SessionCommandResponse) XXX_Size() int

func (*SessionCommandResponse) XXX_Unmarshal

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

type SessionCommandResponse_CloseService added in v0.9.1

type SessionCommandResponse_CloseService struct {
	CloseService *CloseServiceResponse `protobuf:"bytes,2,opt,name=close_service,json=closeService,proto3,oneof" json:"close_service,omitempty"`
}

func (*SessionCommandResponse_CloseService) MarshalTo added in v0.9.1

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

func (*SessionCommandResponse_CloseService) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandResponse_CloseService) Size added in v0.9.1

type SessionCommandResponse_CreateService added in v0.9.1

type SessionCommandResponse_CreateService struct {
	CreateService *CreateServiceResponse `protobuf:"bytes,1,opt,name=create_service,json=createService,proto3,oneof" json:"create_service,omitempty"`
}

func (*SessionCommandResponse_CreateService) MarshalTo added in v0.9.1

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

func (*SessionCommandResponse_CreateService) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandResponse_CreateService) Size added in v0.9.1

type SessionCommandResponse_ServiceCommand added in v0.9.1

type SessionCommandResponse_ServiceCommand struct {
	ServiceCommand *ServiceCommandResponse `protobuf:"bytes,3,opt,name=service_command,json=serviceCommand,proto3,oneof" json:"service_command,omitempty"`
}

func (*SessionCommandResponse_ServiceCommand) MarshalTo added in v0.9.1

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

func (*SessionCommandResponse_ServiceCommand) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandResponse_ServiceCommand) Size added in v0.9.1

type SessionCommandSnapshot added in v0.9.1

type SessionCommandSnapshot struct {
	CommandID        CommandID                `protobuf:"varint,1,opt,name=command_id,json=commandId,proto3,casttype=CommandID" json:"command_id,omitempty"`
	State            SessionCommandState      `protobuf:"varint,2,opt,name=state,proto3,enum=atomix.service.SessionCommandState" json:"state,omitempty"`
	Request          *ServiceCommandRequest   `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
	PendingResponses []ServiceCommandResponse `protobuf:"bytes,4,rep,name=pending_responses,json=pendingResponses,proto3" json:"pending_responses"`
}

func (*SessionCommandSnapshot) Descriptor added in v0.9.1

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

func (*SessionCommandSnapshot) GetCommandID added in v0.9.1

func (m *SessionCommandSnapshot) GetCommandID() CommandID

func (*SessionCommandSnapshot) GetPendingResponses added in v0.9.1

func (m *SessionCommandSnapshot) GetPendingResponses() []ServiceCommandResponse

func (*SessionCommandSnapshot) GetRequest added in v0.9.1

func (*SessionCommandSnapshot) GetState added in v0.9.1

func (*SessionCommandSnapshot) Marshal added in v0.9.1

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

func (*SessionCommandSnapshot) MarshalTo added in v0.9.1

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

func (*SessionCommandSnapshot) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionCommandSnapshot) ProtoMessage added in v0.9.1

func (*SessionCommandSnapshot) ProtoMessage()

func (*SessionCommandSnapshot) Reset added in v0.9.1

func (m *SessionCommandSnapshot) Reset()

func (*SessionCommandSnapshot) Size added in v0.9.1

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

func (*SessionCommandSnapshot) String added in v0.9.1

func (m *SessionCommandSnapshot) String() string

func (*SessionCommandSnapshot) Unmarshal added in v0.9.1

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

func (*SessionCommandSnapshot) XXX_DiscardUnknown added in v0.9.1

func (m *SessionCommandSnapshot) XXX_DiscardUnknown()

func (*SessionCommandSnapshot) XXX_Marshal added in v0.9.1

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

func (*SessionCommandSnapshot) XXX_Merge added in v0.9.1

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

func (*SessionCommandSnapshot) XXX_Size added in v0.9.1

func (m *SessionCommandSnapshot) XXX_Size() int

func (*SessionCommandSnapshot) XXX_Unmarshal added in v0.9.1

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

type SessionCommandState added in v0.9.1

type SessionCommandState int32
const (
	SessionCommandState_COMMAND_OPEN     SessionCommandState = 0
	SessionCommandState_COMMAND_COMPLETE SessionCommandState = 1
)

func (SessionCommandState) EnumDescriptor added in v0.9.1

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

func (SessionCommandState) String added in v0.9.1

func (x SessionCommandState) String() string

type SessionID

type SessionID uint64

SessionID is a session identifier

type SessionQueryRequest

type SessionQueryRequest struct {
	SessionID SessionID `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
	// Types that are valid to be assigned to Request:
	//	*SessionQueryRequest_ServiceQuery
	Request isSessionQueryRequest_Request `protobuf_oneof:"request"`
}

func (*SessionQueryRequest) Descriptor

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

func (*SessionQueryRequest) GetRequest added in v0.9.1

func (m *SessionQueryRequest) GetRequest() isSessionQueryRequest_Request

func (*SessionQueryRequest) GetServiceQuery added in v0.9.1

func (m *SessionQueryRequest) GetServiceQuery() *ServiceQueryRequest

func (*SessionQueryRequest) GetSessionID added in v0.9.1

func (m *SessionQueryRequest) GetSessionID() SessionID

func (*SessionQueryRequest) Marshal

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

func (*SessionQueryRequest) MarshalTo

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

func (*SessionQueryRequest) MarshalToSizedBuffer

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

func (*SessionQueryRequest) ProtoMessage

func (*SessionQueryRequest) ProtoMessage()

func (*SessionQueryRequest) Reset

func (m *SessionQueryRequest) Reset()

func (*SessionQueryRequest) Size

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

func (*SessionQueryRequest) String

func (m *SessionQueryRequest) String() string

func (*SessionQueryRequest) Unmarshal

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

func (*SessionQueryRequest) XXX_DiscardUnknown

func (m *SessionQueryRequest) XXX_DiscardUnknown()

func (*SessionQueryRequest) XXX_Marshal

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

func (*SessionQueryRequest) XXX_Merge

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

func (*SessionQueryRequest) XXX_OneofWrappers added in v0.9.1

func (*SessionQueryRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionQueryRequest) XXX_Size

func (m *SessionQueryRequest) XXX_Size() int

func (*SessionQueryRequest) XXX_Unmarshal

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

type SessionQueryRequest_ServiceQuery added in v0.9.1

type SessionQueryRequest_ServiceQuery struct {
	ServiceQuery *ServiceQueryRequest `protobuf:"bytes,2,opt,name=service_query,json=serviceQuery,proto3,oneof" json:"service_query,omitempty"`
}

func (*SessionQueryRequest_ServiceQuery) MarshalTo added in v0.9.1

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

func (*SessionQueryRequest_ServiceQuery) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionQueryRequest_ServiceQuery) Size added in v0.9.1

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

type SessionQueryResponse

type SessionQueryResponse struct {
	// Types that are valid to be assigned to Response:
	//	*SessionQueryResponse_ServiceQuery
	Response isSessionQueryResponse_Response `protobuf_oneof:"response"`
}

func (*SessionQueryResponse) Descriptor

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

func (*SessionQueryResponse) GetResponse

func (m *SessionQueryResponse) GetResponse() isSessionQueryResponse_Response

func (*SessionQueryResponse) GetServiceQuery added in v0.9.1

func (m *SessionQueryResponse) GetServiceQuery() *ServiceQueryResponse

func (*SessionQueryResponse) Marshal

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

func (*SessionQueryResponse) MarshalTo

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

func (*SessionQueryResponse) MarshalToSizedBuffer

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

func (*SessionQueryResponse) ProtoMessage

func (*SessionQueryResponse) ProtoMessage()

func (*SessionQueryResponse) Reset

func (m *SessionQueryResponse) Reset()

func (*SessionQueryResponse) Size

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

func (*SessionQueryResponse) String

func (m *SessionQueryResponse) String() string

func (*SessionQueryResponse) Unmarshal

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

func (*SessionQueryResponse) XXX_DiscardUnknown

func (m *SessionQueryResponse) XXX_DiscardUnknown()

func (*SessionQueryResponse) XXX_Marshal

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

func (*SessionQueryResponse) XXX_Merge

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

func (*SessionQueryResponse) XXX_OneofWrappers added in v0.9.1

func (*SessionQueryResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionQueryResponse) XXX_Size

func (m *SessionQueryResponse) XXX_Size() int

func (*SessionQueryResponse) XXX_Unmarshal

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

type SessionQueryResponse_ServiceQuery added in v0.9.1

type SessionQueryResponse_ServiceQuery struct {
	ServiceQuery *ServiceQueryResponse `protobuf:"bytes,2,opt,name=service_query,json=serviceQuery,proto3,oneof" json:"service_query,omitempty"`
}

func (*SessionQueryResponse_ServiceQuery) MarshalTo added in v0.9.1

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

func (*SessionQueryResponse_ServiceQuery) MarshalToSizedBuffer added in v0.9.1

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

func (*SessionQueryResponse_ServiceQuery) Size added in v0.9.1

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

type SessionSnapshot

type SessionSnapshot struct {
	SessionID   SessionID     `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
	Timeout     time.Duration `protobuf:"bytes,2,opt,name=timeout,proto3,stdduration" json:"timeout"`
	LastUpdated time.Time     `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3,stdtime" json:"last_updated"`
}

func (*SessionSnapshot) Descriptor

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

func (*SessionSnapshot) GetLastUpdated added in v0.9.1

func (m *SessionSnapshot) GetLastUpdated() time.Time

func (*SessionSnapshot) GetSessionID

func (m *SessionSnapshot) GetSessionID() SessionID

func (*SessionSnapshot) GetTimeout

func (m *SessionSnapshot) GetTimeout() time.Duration

func (*SessionSnapshot) Marshal

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

func (*SessionSnapshot) MarshalTo

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

func (*SessionSnapshot) MarshalToSizedBuffer

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

func (*SessionSnapshot) ProtoMessage

func (*SessionSnapshot) ProtoMessage()

func (*SessionSnapshot) Reset

func (m *SessionSnapshot) Reset()

func (*SessionSnapshot) Size

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

func (*SessionSnapshot) String

func (m *SessionSnapshot) String() string

func (*SessionSnapshot) Unmarshal

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

func (*SessionSnapshot) XXX_DiscardUnknown

func (m *SessionSnapshot) XXX_DiscardUnknown()

func (*SessionSnapshot) XXX_Marshal

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

func (*SessionSnapshot) XXX_Merge

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

func (*SessionSnapshot) XXX_Size

func (m *SessionSnapshot) XXX_Size() int

func (*SessionSnapshot) XXX_Unmarshal

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

type SessionState added in v0.9.1

type SessionState int
const (
	SessionClosed SessionState = iota
	SessionOpen
)

type Sessions added in v0.9.1

type Sessions interface {
	// Get gets a session by ID
	Get(SessionID) (Session, bool)
	// List lists all open sessions
	List() []Session
}

Sessions provides access to open sessions

type StateMachine

type StateMachine interface {
	// Snapshot snapshots the state machine state to the given writer
	Snapshot(writer io.Writer) error

	// Restore restores the state machine state from the given reader
	Restore(reader io.Reader) error

	// Command applies a command to the state machine
	Command(bytes []byte, stream streams.WriteStream)

	// Query applies a query to the state machine
	Query(bytes []byte, stream streams.WriteStream)
}

StateMachine applies commands from a protocol to a collection of state machines

func NewStateMachine added in v0.9.1

func NewStateMachine(registry *Registry) StateMachine

NewStateMachine returns a new RSM state machine

type StateMachineSnapshot added in v0.7.0

type StateMachineSnapshot struct {
	Index     Index              `protobuf:"varint,1,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	Timestamp time.Time          `protobuf:"bytes,2,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
	Sessions  []*SessionSnapshot `protobuf:"bytes,3,rep,name=sessions,proto3" json:"sessions,omitempty"`
	Services  []*ServiceSnapshot `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty"`
}

func (*StateMachineSnapshot) Descriptor added in v0.7.0

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

func (*StateMachineSnapshot) GetIndex added in v0.7.0

func (m *StateMachineSnapshot) GetIndex() Index

func (*StateMachineSnapshot) GetServices added in v0.7.0

func (m *StateMachineSnapshot) GetServices() []*ServiceSnapshot

func (*StateMachineSnapshot) GetSessions added in v0.7.0

func (m *StateMachineSnapshot) GetSessions() []*SessionSnapshot

func (*StateMachineSnapshot) GetTimestamp added in v0.7.0

func (m *StateMachineSnapshot) GetTimestamp() time.Time

func (*StateMachineSnapshot) Marshal added in v0.7.0

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

func (*StateMachineSnapshot) MarshalTo added in v0.7.0

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

func (*StateMachineSnapshot) MarshalToSizedBuffer added in v0.7.0

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

func (*StateMachineSnapshot) ProtoMessage added in v0.7.0

func (*StateMachineSnapshot) ProtoMessage()

func (*StateMachineSnapshot) Reset added in v0.7.0

func (m *StateMachineSnapshot) Reset()

func (*StateMachineSnapshot) Size added in v0.7.0

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

func (*StateMachineSnapshot) String added in v0.7.0

func (m *StateMachineSnapshot) String() string

func (*StateMachineSnapshot) Unmarshal added in v0.7.0

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

func (*StateMachineSnapshot) XXX_DiscardUnknown added in v0.7.0

func (m *StateMachineSnapshot) XXX_DiscardUnknown()

func (*StateMachineSnapshot) XXX_Marshal added in v0.7.0

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

func (*StateMachineSnapshot) XXX_Merge added in v0.7.0

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

func (*StateMachineSnapshot) XXX_Size added in v0.7.0

func (m *StateMachineSnapshot) XXX_Size() int

func (*StateMachineSnapshot) XXX_Unmarshal added in v0.7.0

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

type Timer

type Timer interface {
	// Cancel cancels the timer, preventing it from running in the future
	Cancel()
}

Timer is a cancellable timer

type UnimplementedPartitionServiceServer added in v0.9.1

type UnimplementedPartitionServiceServer struct {
}

UnimplementedPartitionServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedPartitionServiceServer) Command added in v0.9.1

func (*UnimplementedPartitionServiceServer) CommandStream added in v0.9.1

func (*UnimplementedPartitionServiceServer) Query added in v0.9.1

func (*UnimplementedPartitionServiceServer) QueryStream added in v0.9.1

func (*UnimplementedPartitionServiceServer) WatchConfig added in v0.9.1

type Watcher added in v0.9.1

type Watcher interface {
	// Cancel cancels the watcher
	Cancel()
}

Watcher is a context for a Watch call

Directories

Path Synopsis
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.
Code generated by atomix-go-framework.

Jump to

Keyboard shortcuts

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