service

package
v0.0.0-...-1bf965b Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

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 (
	ErrInvalidLengthSession        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSession          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSession = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTest        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTest          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTest = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ResponseType_name = map[int32]string{
	0: "RESPONSE",
	1: "OPEN_STREAM",
	2: "CLOSE_STREAM",
}
View Source
var ResponseType_value = map[string]int32{
	"RESPONSE":     0,
	"OPEN_STREAM":  1,
	"CLOSE_STREAM": 2,
}

Functions

This section is empty.

Types

type CloseSessionRequest

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

func (*CloseSessionRequest) Descriptor

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

func (*CloseSessionRequest) GetSessionID

func (m *CloseSessionRequest) GetSessionID() uint64

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 CommandRequest

type CommandRequest struct {
	Context *RequestContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Name    string          `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Command []byte          `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
}

func (*CommandRequest) Descriptor

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

func (*CommandRequest) GetCommand

func (m *CommandRequest) GetCommand() []byte

func (*CommandRequest) GetContext

func (m *CommandRequest) GetContext() *RequestContext

func (*CommandRequest) GetName

func (m *CommandRequest) GetName() string

func (*CommandRequest) Marshal

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

func (*CommandRequest) MarshalTo

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

func (*CommandRequest) MarshalToSizedBuffer

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

func (*CommandRequest) ProtoMessage

func (*CommandRequest) ProtoMessage()

func (*CommandRequest) Reset

func (m *CommandRequest) Reset()

func (*CommandRequest) Size

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

func (*CommandRequest) String

func (m *CommandRequest) String() string

func (*CommandRequest) Unmarshal

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

func (*CommandRequest) XXX_DiscardUnknown

func (m *CommandRequest) XXX_DiscardUnknown()

func (*CommandRequest) XXX_Marshal

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

func (*CommandRequest) XXX_Merge

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

func (*CommandRequest) XXX_Size

func (m *CommandRequest) XXX_Size() int

func (*CommandRequest) XXX_Unmarshal

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

type CommandResponse

type CommandResponse struct {
	Context *ResponseContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Output  []byte           `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}

func (*CommandResponse) Descriptor

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

func (*CommandResponse) GetContext

func (m *CommandResponse) GetContext() *ResponseContext

func (*CommandResponse) GetOutput

func (m *CommandResponse) GetOutput() []byte

func (*CommandResponse) Marshal

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

func (*CommandResponse) MarshalTo

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

func (*CommandResponse) MarshalToSizedBuffer

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

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) Reset

func (m *CommandResponse) Reset()

func (*CommandResponse) Size

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

func (*CommandResponse) String

func (m *CommandResponse) String() string

func (*CommandResponse) Unmarshal

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

func (*CommandResponse) XXX_DiscardUnknown

func (m *CommandResponse) XXX_DiscardUnknown()

func (*CommandResponse) XXX_Marshal

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

func (*CommandResponse) XXX_Merge

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

func (*CommandResponse) XXX_Size

func (m *CommandResponse) XXX_Size() int

func (*CommandResponse) XXX_Unmarshal

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

type Context

type Context interface {
	// Node is the local node identifier
	Node() string

	// Name is the service name
	Name() string

	// Namespace is the service namespace name
	Namespace() string

	// Index returns the current index of the state machine
	Index() uint64

	// Timestamp returns a deterministic, monotonically increasing timestamp
	Timestamp() time.Time

	// OperationType returns the type of the operation currently being executed against the state machine
	OperationType() OperationType
}

Context provides information about the context within which a state machine is running

type CreateRequest

type CreateRequest struct {
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) Marshal

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

func (*CreateRequest) MarshalTo

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

func (*CreateRequest) MarshalToSizedBuffer

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

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) Size

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

func (*CreateRequest) String

func (m *CreateRequest) String() string

func (*CreateRequest) Unmarshal

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

func (*CreateRequest) XXX_DiscardUnknown

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal

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

func (*CreateRequest) XXX_Merge

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

func (*CreateRequest) XXX_Size

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal

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

type CreateResponse

type CreateResponse struct {
}

func (*CreateResponse) Descriptor

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

func (*CreateResponse) Marshal

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

func (*CreateResponse) MarshalTo

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

func (*CreateResponse) MarshalToSizedBuffer

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

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset

func (m *CreateResponse) Reset()

func (*CreateResponse) Size

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

func (*CreateResponse) String

func (m *CreateResponse) String() string

func (*CreateResponse) Unmarshal

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

func (*CreateResponse) XXX_DiscardUnknown

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal

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

func (*CreateResponse) XXX_Merge

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

func (*CreateResponse) XXX_Size

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal

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

type DeleteRequest

type DeleteRequest struct {
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) Marshal

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

func (*DeleteRequest) MarshalTo

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

func (*DeleteRequest) MarshalToSizedBuffer

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

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) Size

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

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) Unmarshal

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

func (*DeleteRequest) XXX_DiscardUnknown

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal

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

func (*DeleteRequest) XXX_Merge

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

func (*DeleteRequest) XXX_Size

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal

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

type DeleteResponse

type DeleteResponse struct {
}

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) Marshal

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

func (*DeleteResponse) MarshalTo

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

func (*DeleteResponse) MarshalToSizedBuffer

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

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) Size

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

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

func (*DeleteResponse) Unmarshal

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

func (*DeleteResponse) XXX_DiscardUnknown

func (m *DeleteResponse) XXX_DiscardUnknown()

func (*DeleteResponse) XXX_Marshal

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

func (*DeleteResponse) XXX_Merge

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

func (*DeleteResponse) XXX_Size

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal

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

type Executor

type Executor interface {
	// RegisterUnaryOperation registers a unary primitive operation
	RegisterUnaryOperation(name string, callback func([]byte) ([]byte, error))

	// RegisterStreamOperation registers a new primitive operation
	RegisterStreamOperation(name string, callback func([]byte, stream.WriteStream))

	// GetOperation returns an operation by name
	GetOperation(name string) Operation
}

Executor executes primitive operations

type GetRequest

type GetRequest struct {
}

Get request

func (*GetRequest) Descriptor

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

func (*GetRequest) Marshal

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

func (*GetRequest) MarshalTo

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

func (*GetRequest) MarshalToSizedBuffer

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

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) Size

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

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

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

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type GetResponse

type GetResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

Get response

func (*GetResponse) Descriptor

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

func (*GetResponse) GetValue

func (m *GetResponse) GetValue() string

func (*GetResponse) Marshal

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

func (*GetResponse) MarshalTo

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

func (*GetResponse) MarshalToSizedBuffer

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

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) Size

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

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal

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

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

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

func (*GetResponse) XXX_Merge

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

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

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

type KeepAliveRequest

type KeepAliveRequest struct {
	SessionID       uint64            `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	CommandSequence uint64            `protobuf:"varint,2,opt,name=command_sequence,json=commandSequence,proto3" json:"command_sequence,omitempty"`
	Streams         map[uint64]uint64 `` /* 157-byte string literal not displayed */
}

func (*KeepAliveRequest) Descriptor

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

func (*KeepAliveRequest) GetCommandSequence

func (m *KeepAliveRequest) GetCommandSequence() uint64

func (*KeepAliveRequest) GetSessionID

func (m *KeepAliveRequest) GetSessionID() uint64

func (*KeepAliveRequest) GetStreams

func (m *KeepAliveRequest) GetStreams() map[uint64]uint64

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 MetadataRequest

type MetadataRequest struct {
	Type      string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
}

func (*MetadataRequest) Descriptor

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

func (*MetadataRequest) GetNamespace

func (m *MetadataRequest) GetNamespace() string

func (*MetadataRequest) GetType

func (m *MetadataRequest) GetType() string

func (*MetadataRequest) Marshal

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

func (*MetadataRequest) MarshalTo

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

func (*MetadataRequest) MarshalToSizedBuffer

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

func (*MetadataRequest) ProtoMessage

func (*MetadataRequest) ProtoMessage()

func (*MetadataRequest) Reset

func (m *MetadataRequest) Reset()

func (*MetadataRequest) Size

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

func (*MetadataRequest) String

func (m *MetadataRequest) String() string

func (*MetadataRequest) Unmarshal

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

func (*MetadataRequest) XXX_DiscardUnknown

func (m *MetadataRequest) XXX_DiscardUnknown()

func (*MetadataRequest) XXX_Marshal

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

func (*MetadataRequest) XXX_Merge

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

func (*MetadataRequest) XXX_Size

func (m *MetadataRequest) XXX_Size() int

func (*MetadataRequest) XXX_Unmarshal

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

type MetadataResponse

type MetadataResponse struct {
	Services []*ServiceId `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
}

func (*MetadataResponse) Descriptor

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

func (*MetadataResponse) GetServices

func (m *MetadataResponse) GetServices() []*ServiceId

func (*MetadataResponse) Marshal

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

func (*MetadataResponse) MarshalTo

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

func (*MetadataResponse) MarshalToSizedBuffer

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

func (*MetadataResponse) ProtoMessage

func (*MetadataResponse) ProtoMessage()

func (*MetadataResponse) Reset

func (m *MetadataResponse) Reset()

func (*MetadataResponse) Size

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

func (*MetadataResponse) String

func (m *MetadataResponse) String() string

func (*MetadataResponse) Unmarshal

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

func (*MetadataResponse) XXX_DiscardUnknown

func (m *MetadataResponse) XXX_DiscardUnknown()

func (*MetadataResponse) XXX_Marshal

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

func (*MetadataResponse) XXX_Merge

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

func (*MetadataResponse) XXX_Size

func (m *MetadataResponse) XXX_Size() int

func (*MetadataResponse) XXX_Unmarshal

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

type OpenSessionRequest

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

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 uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
}

func (*OpenSessionResponse) Descriptor

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

func (*OpenSessionResponse) GetSessionID

func (m *OpenSessionResponse) GetSessionID() uint64

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{}

Operation is the base interface for primitive operations

type OperationType

type OperationType string

OperationType is the type for a service operation

const (
	// OpTypeCommand is an OperationType indicating a command operation
	OpTypeCommand OperationType = "command"
	// OpTypeQuery is an OperationType indicating a query operation
	OpTypeQuery OperationType = "query"
)

type PrimitiveEvent

type PrimitiveEvent struct {
	Type  string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*PrimitiveEvent) Descriptor

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

func (*PrimitiveEvent) GetType

func (m *PrimitiveEvent) GetType() string

func (*PrimitiveEvent) GetValue

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

func (*PrimitiveEvent) Marshal

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

func (*PrimitiveEvent) MarshalTo

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

func (*PrimitiveEvent) MarshalToSizedBuffer

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

func (*PrimitiveEvent) ProtoMessage

func (*PrimitiveEvent) ProtoMessage()

func (*PrimitiveEvent) Reset

func (m *PrimitiveEvent) Reset()

func (*PrimitiveEvent) Size

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

func (*PrimitiveEvent) String

func (m *PrimitiveEvent) String() string

func (*PrimitiveEvent) Unmarshal

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

func (*PrimitiveEvent) XXX_DiscardUnknown

func (m *PrimitiveEvent) XXX_DiscardUnknown()

func (*PrimitiveEvent) XXX_Marshal

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

func (*PrimitiveEvent) XXX_Merge

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

func (*PrimitiveEvent) XXX_Size

func (m *PrimitiveEvent) XXX_Size() int

func (*PrimitiveEvent) XXX_Unmarshal

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

type QueryRequest

type QueryRequest struct {
	Context *RequestContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Name    string          `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Query   []byte          `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
}

func (*QueryRequest) Descriptor

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

func (*QueryRequest) GetContext

func (m *QueryRequest) GetContext() *RequestContext

func (*QueryRequest) GetName

func (m *QueryRequest) GetName() string

func (*QueryRequest) GetQuery

func (m *QueryRequest) GetQuery() []byte

func (*QueryRequest) Marshal

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

func (*QueryRequest) MarshalTo

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

func (*QueryRequest) MarshalToSizedBuffer

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

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) Size

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

func (*QueryRequest) String

func (m *QueryRequest) String() string

func (*QueryRequest) Unmarshal

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

func (*QueryRequest) XXX_DiscardUnknown

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal

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

func (*QueryRequest) XXX_Merge

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

func (*QueryRequest) XXX_Size

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal

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

type QueryResponse

type QueryResponse struct {
	Context *ResponseContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Output  []byte           `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}

func (*QueryResponse) Descriptor

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

func (*QueryResponse) GetContext

func (m *QueryResponse) GetContext() *ResponseContext

func (*QueryResponse) GetOutput

func (m *QueryResponse) GetOutput() []byte

func (*QueryResponse) Marshal

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

func (*QueryResponse) MarshalTo

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

func (*QueryResponse) MarshalToSizedBuffer

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

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) Size

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

func (*QueryResponse) String

func (m *QueryResponse) String() string

func (*QueryResponse) Unmarshal

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

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

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

func (*QueryResponse) XXX_Merge

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

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

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

type RequestContext

type RequestContext struct {
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
}

func (*RequestContext) Descriptor

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

func (*RequestContext) GetIndex

func (m *RequestContext) GetIndex() uint64

func (*RequestContext) Marshal

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

func (*RequestContext) MarshalTo

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

func (*RequestContext) MarshalToSizedBuffer

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

func (*RequestContext) ProtoMessage

func (*RequestContext) ProtoMessage()

func (*RequestContext) Reset

func (m *RequestContext) Reset()

func (*RequestContext) Size

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

func (*RequestContext) String

func (m *RequestContext) String() string

func (*RequestContext) Unmarshal

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

func (*RequestContext) XXX_DiscardUnknown

func (m *RequestContext) XXX_DiscardUnknown()

func (*RequestContext) XXX_Marshal

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

func (*RequestContext) XXX_Merge

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

func (*RequestContext) XXX_Size

func (m *RequestContext) XXX_Size() int

func (*RequestContext) XXX_Unmarshal

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

type ResponseContext

type ResponseContext struct {
	Index uint64       `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Type  ResponseType `protobuf:"varint,2,opt,name=type,proto3,enum=atomix.service.ResponseType" json:"type,omitempty"`
}

func (*ResponseContext) Descriptor

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

func (*ResponseContext) GetIndex

func (m *ResponseContext) GetIndex() uint64

func (*ResponseContext) GetType

func (m *ResponseContext) GetType() ResponseType

func (*ResponseContext) Marshal

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

func (*ResponseContext) MarshalTo

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

func (*ResponseContext) MarshalToSizedBuffer

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

func (*ResponseContext) ProtoMessage

func (*ResponseContext) ProtoMessage()

func (*ResponseContext) Reset

func (m *ResponseContext) Reset()

func (*ResponseContext) Size

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

func (*ResponseContext) String

func (m *ResponseContext) String() string

func (*ResponseContext) Unmarshal

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

func (*ResponseContext) XXX_DiscardUnknown

func (m *ResponseContext) XXX_DiscardUnknown()

func (*ResponseContext) XXX_Marshal

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

func (*ResponseContext) XXX_Merge

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

func (*ResponseContext) XXX_Size

func (m *ResponseContext) XXX_Size() int

func (*ResponseContext) XXX_Unmarshal

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

type ResponseType

type ResponseType int32
const (
	ResponseType_RESPONSE     ResponseType = 0
	ResponseType_OPEN_STREAM  ResponseType = 1
	ResponseType_CLOSE_STREAM ResponseType = 2
)

func (ResponseType) EnumDescriptor

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

func (ResponseType) String

func (x ResponseType) String() string

type Scheduler

type Scheduler interface {
	// Execute executes a function asynchronously
	Execute(f func())

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

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

	// ScheduleIndex schedules a function to run at a specific index
	ScheduleIndex(index uint64, f func())
}

Scheduler provides deterministic scheduling for a state machine

type Service

type Service interface {
	// Snapshot writes the state machine snapshot to the given writer
	Snapshot(writer io.Writer) error

	// Install reads the state machine snapshot from the given reader
	Install(reader io.Reader) error

	// CanDelete returns a bool indicating whether the node can delete changes up to the given index without affecting
	// the correctness of the state machine
	CanDelete(index uint64) bool

	// 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)
}

Service is an interface for primitive services

type ServiceId

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

func (*ServiceId) Descriptor

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

func (*ServiceId) GetName

func (m *ServiceId) GetName() string

func (*ServiceId) GetNamespace

func (m *ServiceId) GetNamespace() string

func (*ServiceId) GetType

func (m *ServiceId) GetType() string

func (*ServiceId) Marshal

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

func (*ServiceId) MarshalTo

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

func (*ServiceId) MarshalToSizedBuffer

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

func (*ServiceId) ProtoMessage

func (*ServiceId) ProtoMessage()

func (*ServiceId) Reset

func (m *ServiceId) Reset()

func (*ServiceId) Size

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

func (*ServiceId) String

func (m *ServiceId) String() string

func (*ServiceId) Unmarshal

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

func (*ServiceId) XXX_DiscardUnknown

func (m *ServiceId) XXX_DiscardUnknown()

func (*ServiceId) XXX_Marshal

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

func (*ServiceId) XXX_Merge

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

func (*ServiceId) XXX_Size

func (m *ServiceId) XXX_Size() int

func (*ServiceId) XXX_Unmarshal

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

type ServiceRequest

type ServiceRequest struct {
	Id *ServiceId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are valid to be assigned to Request:
	//	*ServiceRequest_Create
	//	*ServiceRequest_Delete
	//	*ServiceRequest_Metadata
	//	*ServiceRequest_Command
	//	*ServiceRequest_Query
	Request isServiceRequest_Request `protobuf_oneof:"request"`
}

func (*ServiceRequest) Descriptor

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

func (*ServiceRequest) GetCommand

func (m *ServiceRequest) GetCommand() []byte

func (*ServiceRequest) GetCreate

func (m *ServiceRequest) GetCreate() *CreateRequest

func (*ServiceRequest) GetDelete

func (m *ServiceRequest) GetDelete() *DeleteRequest

func (*ServiceRequest) GetId

func (m *ServiceRequest) GetId() *ServiceId

func (*ServiceRequest) GetMetadata

func (m *ServiceRequest) GetMetadata() *MetadataRequest

func (*ServiceRequest) GetQuery

func (m *ServiceRequest) GetQuery() []byte

func (*ServiceRequest) GetRequest

func (m *ServiceRequest) GetRequest() isServiceRequest_Request

func (*ServiceRequest) Marshal

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

func (*ServiceRequest) MarshalTo

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

func (*ServiceRequest) MarshalToSizedBuffer

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

func (*ServiceRequest) ProtoMessage

func (*ServiceRequest) ProtoMessage()

func (*ServiceRequest) Reset

func (m *ServiceRequest) Reset()

func (*ServiceRequest) Size

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

func (*ServiceRequest) String

func (m *ServiceRequest) String() string

func (*ServiceRequest) Unmarshal

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

func (*ServiceRequest) XXX_DiscardUnknown

func (m *ServiceRequest) XXX_DiscardUnknown()

func (*ServiceRequest) XXX_Marshal

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

func (*ServiceRequest) XXX_Merge

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

func (*ServiceRequest) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*ServiceRequest) XXX_Size

func (m *ServiceRequest) XXX_Size() int

func (*ServiceRequest) XXX_Unmarshal

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

type ServiceRequest_Command

type ServiceRequest_Command struct {
	Command []byte `protobuf:"bytes,5,opt,name=command,proto3,oneof" json:"command,omitempty"`
}

func (*ServiceRequest_Command) MarshalTo

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

func (*ServiceRequest_Command) MarshalToSizedBuffer

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

func (*ServiceRequest_Command) Size

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

type ServiceRequest_Create

type ServiceRequest_Create struct {
	Create *CreateRequest `protobuf:"bytes,2,opt,name=create,proto3,oneof" json:"create,omitempty"`
}

func (*ServiceRequest_Create) MarshalTo

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

func (*ServiceRequest_Create) MarshalToSizedBuffer

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

func (*ServiceRequest_Create) Size

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

type ServiceRequest_Delete

type ServiceRequest_Delete struct {
	Delete *DeleteRequest `protobuf:"bytes,3,opt,name=delete,proto3,oneof" json:"delete,omitempty"`
}

func (*ServiceRequest_Delete) MarshalTo

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

func (*ServiceRequest_Delete) MarshalToSizedBuffer

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

func (*ServiceRequest_Delete) Size

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

type ServiceRequest_Metadata

type ServiceRequest_Metadata struct {
	Metadata *MetadataRequest `protobuf:"bytes,4,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}

func (*ServiceRequest_Metadata) MarshalTo

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

func (*ServiceRequest_Metadata) MarshalToSizedBuffer

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

func (*ServiceRequest_Metadata) Size

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

type ServiceRequest_Query

type ServiceRequest_Query struct {
	Query []byte `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
}

func (*ServiceRequest_Query) MarshalTo

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

func (*ServiceRequest_Query) MarshalToSizedBuffer

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

func (*ServiceRequest_Query) Size

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

type ServiceResponse

type ServiceResponse struct {
	// Types that are valid to be assigned to Response:
	//	*ServiceResponse_Create
	//	*ServiceResponse_Delete
	//	*ServiceResponse_Metadata
	//	*ServiceResponse_Command
	//	*ServiceResponse_Query
	Response isServiceResponse_Response `protobuf_oneof:"response"`
}

func (*ServiceResponse) Descriptor

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

func (*ServiceResponse) GetCommand

func (m *ServiceResponse) GetCommand() []byte

func (*ServiceResponse) GetCreate

func (m *ServiceResponse) GetCreate() *CreateResponse

func (*ServiceResponse) GetDelete

func (m *ServiceResponse) GetDelete() *DeleteResponse

func (*ServiceResponse) GetMetadata

func (m *ServiceResponse) GetMetadata() *MetadataResponse

func (*ServiceResponse) GetQuery

func (m *ServiceResponse) GetQuery() []byte

func (*ServiceResponse) GetResponse

func (m *ServiceResponse) GetResponse() isServiceResponse_Response

func (*ServiceResponse) Marshal

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

func (*ServiceResponse) MarshalTo

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

func (*ServiceResponse) MarshalToSizedBuffer

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

func (*ServiceResponse) ProtoMessage

func (*ServiceResponse) ProtoMessage()

func (*ServiceResponse) Reset

func (m *ServiceResponse) Reset()

func (*ServiceResponse) Size

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

func (*ServiceResponse) String

func (m *ServiceResponse) String() string

func (*ServiceResponse) Unmarshal

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

func (*ServiceResponse) XXX_DiscardUnknown

func (m *ServiceResponse) XXX_DiscardUnknown()

func (*ServiceResponse) XXX_Marshal

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

func (*ServiceResponse) XXX_Merge

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

func (*ServiceResponse) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*ServiceResponse) XXX_Size

func (m *ServiceResponse) XXX_Size() int

func (*ServiceResponse) XXX_Unmarshal

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

type ServiceResponse_Command

type ServiceResponse_Command struct {
	Command []byte `protobuf:"bytes,4,opt,name=command,proto3,oneof" json:"command,omitempty"`
}

func (*ServiceResponse_Command) MarshalTo

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

func (*ServiceResponse_Command) MarshalToSizedBuffer

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

func (*ServiceResponse_Command) Size

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

type ServiceResponse_Create

type ServiceResponse_Create struct {
	Create *CreateResponse `protobuf:"bytes,1,opt,name=create,proto3,oneof" json:"create,omitempty"`
}

func (*ServiceResponse_Create) MarshalTo

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

func (*ServiceResponse_Create) MarshalToSizedBuffer

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

func (*ServiceResponse_Create) Size

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

type ServiceResponse_Delete

type ServiceResponse_Delete struct {
	Delete *DeleteResponse `protobuf:"bytes,2,opt,name=delete,proto3,oneof" json:"delete,omitempty"`
}

func (*ServiceResponse_Delete) MarshalTo

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

func (*ServiceResponse_Delete) MarshalToSizedBuffer

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

func (*ServiceResponse_Delete) Size

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

type ServiceResponse_Metadata

type ServiceResponse_Metadata struct {
	Metadata *MetadataResponse `protobuf:"bytes,3,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}

func (*ServiceResponse_Metadata) MarshalTo

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

func (*ServiceResponse_Metadata) MarshalToSizedBuffer

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

func (*ServiceResponse_Metadata) Size

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

type ServiceResponse_Query

type ServiceResponse_Query struct {
	Query []byte `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
}

func (*ServiceResponse_Query) MarshalTo

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

func (*ServiceResponse_Query) MarshalToSizedBuffer

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

func (*ServiceResponse_Query) Size

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

type ServiceSnapshot

type ServiceSnapshot struct {
	Index    uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Snapshot []byte `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
}

func (*ServiceSnapshot) Descriptor

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

func (*ServiceSnapshot) GetIndex

func (m *ServiceSnapshot) GetIndex() uint64

func (*ServiceSnapshot) GetSnapshot

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

func (*ServiceSnapshot) Marshal

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

func (*ServiceSnapshot) MarshalTo

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

func (*ServiceSnapshot) MarshalToSizedBuffer

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

func (*ServiceSnapshot) ProtoMessage

func (*ServiceSnapshot) ProtoMessage()

func (*ServiceSnapshot) Reset

func (m *ServiceSnapshot) Reset()

func (*ServiceSnapshot) Size

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

func (*ServiceSnapshot) String

func (m *ServiceSnapshot) String() string

func (*ServiceSnapshot) Unmarshal

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

func (*ServiceSnapshot) XXX_DiscardUnknown

func (m *ServiceSnapshot) XXX_DiscardUnknown()

func (*ServiceSnapshot) XXX_Marshal

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

func (*ServiceSnapshot) XXX_Merge

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

func (*ServiceSnapshot) XXX_Size

func (m *ServiceSnapshot) XXX_Size() int

func (*ServiceSnapshot) XXX_Unmarshal

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

type Session

type Session struct {
	ID          uint64
	Timeout     time.Duration
	LastUpdated time.Time
	// contains filtered or unexported fields
}

Session manages the ordering of request and response streams for a single client

func (*Session) Stream

func (s *Session) Stream(id uint64) streams.WriteStream

Stream returns the given stream

func (*Session) StreamID

func (s *Session) StreamID() uint64

StreamID returns the ID of the current stream

func (*Session) Streams

func (s *Session) Streams() []streams.WriteStream

Streams returns a slice of all open streams of any type owned by the session

func (*Session) StreamsOf

func (s *Session) StreamsOf(op string) []streams.WriteStream

StreamsOf returns a slice of all open streams for the given named operation owned by the session

type SessionCommandContext

type SessionCommandContext struct {
	SessionID      uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	SequenceNumber uint64 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
}

func (*SessionCommandContext) Descriptor

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

func (*SessionCommandContext) GetSequenceNumber

func (m *SessionCommandContext) GetSequenceNumber() uint64

func (*SessionCommandContext) GetSessionID

func (m *SessionCommandContext) GetSessionID() uint64

func (*SessionCommandContext) Marshal

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

func (*SessionCommandContext) MarshalTo

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

func (*SessionCommandContext) MarshalToSizedBuffer

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

func (*SessionCommandContext) ProtoMessage

func (*SessionCommandContext) ProtoMessage()

func (*SessionCommandContext) Reset

func (m *SessionCommandContext) Reset()

func (*SessionCommandContext) Size

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

func (*SessionCommandContext) String

func (m *SessionCommandContext) String() string

func (*SessionCommandContext) Unmarshal

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

func (*SessionCommandContext) XXX_DiscardUnknown

func (m *SessionCommandContext) XXX_DiscardUnknown()

func (*SessionCommandContext) XXX_Marshal

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

func (*SessionCommandContext) XXX_Merge

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

func (*SessionCommandContext) XXX_Size

func (m *SessionCommandContext) XXX_Size() int

func (*SessionCommandContext) XXX_Unmarshal

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

type SessionCommandRequest

type SessionCommandRequest struct {
	Context *SessionCommandContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Name    string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Input   []byte                 `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"`
}

func (*SessionCommandRequest) Descriptor

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

func (*SessionCommandRequest) GetContext

func (*SessionCommandRequest) GetInput

func (m *SessionCommandRequest) GetInput() []byte

func (*SessionCommandRequest) GetName

func (m *SessionCommandRequest) GetName() string

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_Size

func (m *SessionCommandRequest) XXX_Size() int

func (*SessionCommandRequest) XXX_Unmarshal

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

type SessionCommandResponse

type SessionCommandResponse struct {
	Context *SessionResponseContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Output  []byte                  `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}

func (*SessionCommandResponse) Descriptor

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

func (*SessionCommandResponse) GetContext

func (*SessionCommandResponse) GetOutput

func (m *SessionCommandResponse) GetOutput() []byte

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_Size

func (m *SessionCommandResponse) XXX_Size() int

func (*SessionCommandResponse) XXX_Unmarshal

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

type SessionQueryContext

type SessionQueryContext struct {
	SessionID          uint64 `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	LastSequenceNumber uint64 `protobuf:"varint,2,opt,name=last_sequence_number,json=lastSequenceNumber,proto3" json:"last_sequence_number,omitempty"`
	LastIndex          uint64 `protobuf:"varint,3,opt,name=last_index,json=lastIndex,proto3" json:"last_index,omitempty"`
}

func (*SessionQueryContext) Descriptor

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

func (*SessionQueryContext) GetLastIndex

func (m *SessionQueryContext) GetLastIndex() uint64

func (*SessionQueryContext) GetLastSequenceNumber

func (m *SessionQueryContext) GetLastSequenceNumber() uint64

func (*SessionQueryContext) GetSessionID

func (m *SessionQueryContext) GetSessionID() uint64

func (*SessionQueryContext) Marshal

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

func (*SessionQueryContext) MarshalTo

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

func (*SessionQueryContext) MarshalToSizedBuffer

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

func (*SessionQueryContext) ProtoMessage

func (*SessionQueryContext) ProtoMessage()

func (*SessionQueryContext) Reset

func (m *SessionQueryContext) Reset()

func (*SessionQueryContext) Size

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

func (*SessionQueryContext) String

func (m *SessionQueryContext) String() string

func (*SessionQueryContext) Unmarshal

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

func (*SessionQueryContext) XXX_DiscardUnknown

func (m *SessionQueryContext) XXX_DiscardUnknown()

func (*SessionQueryContext) XXX_Marshal

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

func (*SessionQueryContext) XXX_Merge

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

func (*SessionQueryContext) XXX_Size

func (m *SessionQueryContext) XXX_Size() int

func (*SessionQueryContext) XXX_Unmarshal

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

type SessionQueryRequest

type SessionQueryRequest struct {
	Context *SessionQueryContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Name    string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Input   []byte               `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"`
}

func (*SessionQueryRequest) Descriptor

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

func (*SessionQueryRequest) GetContext

func (m *SessionQueryRequest) GetContext() *SessionQueryContext

func (*SessionQueryRequest) GetInput

func (m *SessionQueryRequest) GetInput() []byte

func (*SessionQueryRequest) GetName

func (m *SessionQueryRequest) GetName() string

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_Size

func (m *SessionQueryRequest) XXX_Size() int

func (*SessionQueryRequest) XXX_Unmarshal

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

type SessionQueryResponse

type SessionQueryResponse struct {
	Context *SessionResponseContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Output  []byte                  `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}

func (*SessionQueryResponse) Descriptor

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

func (*SessionQueryResponse) GetContext

func (*SessionQueryResponse) GetOutput

func (m *SessionQueryResponse) GetOutput() []byte

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_Size

func (m *SessionQueryResponse) XXX_Size() int

func (*SessionQueryResponse) XXX_Unmarshal

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

type SessionRequest

type SessionRequest struct {
	// Types that are valid to be assigned to Request:
	//	*SessionRequest_OpenSession
	//	*SessionRequest_KeepAlive
	//	*SessionRequest_CloseSession
	//	*SessionRequest_Command
	//	*SessionRequest_Query
	Request isSessionRequest_Request `protobuf_oneof:"request"`
}

func (*SessionRequest) Descriptor

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

func (*SessionRequest) GetCloseSession

func (m *SessionRequest) GetCloseSession() *CloseSessionRequest

func (*SessionRequest) GetCommand

func (m *SessionRequest) GetCommand() *SessionCommandRequest

func (*SessionRequest) GetKeepAlive

func (m *SessionRequest) GetKeepAlive() *KeepAliveRequest

func (*SessionRequest) GetOpenSession

func (m *SessionRequest) GetOpenSession() *OpenSessionRequest

func (*SessionRequest) GetQuery

func (m *SessionRequest) GetQuery() *SessionQueryRequest

func (*SessionRequest) GetRequest

func (m *SessionRequest) GetRequest() isSessionRequest_Request

func (*SessionRequest) Marshal

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

func (*SessionRequest) MarshalTo

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

func (*SessionRequest) MarshalToSizedBuffer

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

func (*SessionRequest) ProtoMessage

func (*SessionRequest) ProtoMessage()

func (*SessionRequest) Reset

func (m *SessionRequest) Reset()

func (*SessionRequest) Size

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

func (*SessionRequest) String

func (m *SessionRequest) String() string

func (*SessionRequest) Unmarshal

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

func (*SessionRequest) XXX_DiscardUnknown

func (m *SessionRequest) XXX_DiscardUnknown()

func (*SessionRequest) XXX_Marshal

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

func (*SessionRequest) XXX_Merge

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

func (*SessionRequest) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionRequest) XXX_Size

func (m *SessionRequest) XXX_Size() int

func (*SessionRequest) XXX_Unmarshal

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

type SessionRequest_CloseSession

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

func (*SessionRequest_CloseSession) MarshalTo

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

func (*SessionRequest_CloseSession) MarshalToSizedBuffer

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

func (*SessionRequest_CloseSession) Size

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

type SessionRequest_Command

type SessionRequest_Command struct {
	Command *SessionCommandRequest `protobuf:"bytes,4,opt,name=command,proto3,oneof" json:"command,omitempty"`
}

func (*SessionRequest_Command) MarshalTo

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

func (*SessionRequest_Command) MarshalToSizedBuffer

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

func (*SessionRequest_Command) Size

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

type SessionRequest_KeepAlive

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

func (*SessionRequest_KeepAlive) MarshalTo

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

func (*SessionRequest_KeepAlive) MarshalToSizedBuffer

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

func (*SessionRequest_KeepAlive) Size

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

type SessionRequest_OpenSession

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

func (*SessionRequest_OpenSession) MarshalTo

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

func (*SessionRequest_OpenSession) MarshalToSizedBuffer

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

func (*SessionRequest_OpenSession) Size

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

type SessionRequest_Query

type SessionRequest_Query struct {
	Query *SessionQueryRequest `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
}

func (*SessionRequest_Query) MarshalTo

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

func (*SessionRequest_Query) MarshalToSizedBuffer

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

func (*SessionRequest_Query) Size

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

type SessionResponse

type SessionResponse struct {
	// Types that are valid to be assigned to Response:
	//	*SessionResponse_OpenSession
	//	*SessionResponse_KeepAlive
	//	*SessionResponse_CloseSession
	//	*SessionResponse_Command
	//	*SessionResponse_Query
	Response isSessionResponse_Response `protobuf_oneof:"response"`
}

func (*SessionResponse) Descriptor

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

func (*SessionResponse) GetCloseSession

func (m *SessionResponse) GetCloseSession() *CloseSessionResponse

func (*SessionResponse) GetCommand

func (m *SessionResponse) GetCommand() *SessionCommandResponse

func (*SessionResponse) GetKeepAlive

func (m *SessionResponse) GetKeepAlive() *KeepAliveResponse

func (*SessionResponse) GetOpenSession

func (m *SessionResponse) GetOpenSession() *OpenSessionResponse

func (*SessionResponse) GetQuery

func (m *SessionResponse) GetQuery() *SessionQueryResponse

func (*SessionResponse) GetResponse

func (m *SessionResponse) GetResponse() isSessionResponse_Response

func (*SessionResponse) Marshal

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

func (*SessionResponse) MarshalTo

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

func (*SessionResponse) MarshalToSizedBuffer

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

func (*SessionResponse) ProtoMessage

func (*SessionResponse) ProtoMessage()

func (*SessionResponse) Reset

func (m *SessionResponse) Reset()

func (*SessionResponse) Size

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

func (*SessionResponse) String

func (m *SessionResponse) String() string

func (*SessionResponse) Unmarshal

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

func (*SessionResponse) XXX_DiscardUnknown

func (m *SessionResponse) XXX_DiscardUnknown()

func (*SessionResponse) XXX_Marshal

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

func (*SessionResponse) XXX_Merge

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

func (*SessionResponse) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*SessionResponse) XXX_Size

func (m *SessionResponse) XXX_Size() int

func (*SessionResponse) XXX_Unmarshal

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

type SessionResponseContext

type SessionResponseContext struct {
	StreamID uint64       `protobuf:"varint,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Index    uint64       `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Sequence uint64       `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Type     ResponseType `protobuf:"varint,4,opt,name=type,proto3,enum=atomix.service.ResponseType" json:"type,omitempty"`
}

func (*SessionResponseContext) Descriptor

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

func (*SessionResponseContext) GetIndex

func (m *SessionResponseContext) GetIndex() uint64

func (*SessionResponseContext) GetSequence

func (m *SessionResponseContext) GetSequence() uint64

func (*SessionResponseContext) GetStreamID

func (m *SessionResponseContext) GetStreamID() uint64

func (*SessionResponseContext) GetType

func (m *SessionResponseContext) GetType() ResponseType

func (*SessionResponseContext) Marshal

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

func (*SessionResponseContext) MarshalTo

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

func (*SessionResponseContext) MarshalToSizedBuffer

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

func (*SessionResponseContext) ProtoMessage

func (*SessionResponseContext) ProtoMessage()

func (*SessionResponseContext) Reset

func (m *SessionResponseContext) Reset()

func (*SessionResponseContext) Size

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

func (*SessionResponseContext) String

func (m *SessionResponseContext) String() string

func (*SessionResponseContext) Unmarshal

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

func (*SessionResponseContext) XXX_DiscardUnknown

func (m *SessionResponseContext) XXX_DiscardUnknown()

func (*SessionResponseContext) XXX_Marshal

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

func (*SessionResponseContext) XXX_Merge

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

func (*SessionResponseContext) XXX_Size

func (m *SessionResponseContext) XXX_Size() int

func (*SessionResponseContext) XXX_Unmarshal

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

type SessionResponse_CloseSession

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

func (*SessionResponse_CloseSession) MarshalTo

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

func (*SessionResponse_CloseSession) MarshalToSizedBuffer

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

func (*SessionResponse_CloseSession) Size

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

type SessionResponse_Command

type SessionResponse_Command struct {
	Command *SessionCommandResponse `protobuf:"bytes,4,opt,name=command,proto3,oneof" json:"command,omitempty"`
}

func (*SessionResponse_Command) MarshalTo

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

func (*SessionResponse_Command) MarshalToSizedBuffer

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

func (*SessionResponse_Command) Size

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

type SessionResponse_KeepAlive

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

func (*SessionResponse_KeepAlive) MarshalTo

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

func (*SessionResponse_KeepAlive) MarshalToSizedBuffer

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

func (*SessionResponse_KeepAlive) Size

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

type SessionResponse_OpenSession

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

func (*SessionResponse_OpenSession) MarshalTo

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

func (*SessionResponse_OpenSession) MarshalToSizedBuffer

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

func (*SessionResponse_OpenSession) Size

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

type SessionResponse_Query

type SessionResponse_Query struct {
	Query *SessionQueryResponse `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
}

func (*SessionResponse_Query) MarshalTo

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

func (*SessionResponse_Query) MarshalToSizedBuffer

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

func (*SessionResponse_Query) Size

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

type SessionSnapshot

type SessionSnapshot struct {
	SessionID       uint64                   `protobuf:"varint,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Timeout         time.Duration            `protobuf:"bytes,2,opt,name=timeout,proto3,stdduration" json:"timeout"`
	Timestamp       time.Time                `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
	CommandSequence uint64                   `protobuf:"varint,4,opt,name=command_sequence,json=commandSequence,proto3" json:"command_sequence,omitempty"`
	LastApplied     uint64                   `protobuf:"varint,5,opt,name=last_applied,json=lastApplied,proto3" json:"last_applied,omitempty"`
	Streams         []*SessionStreamSnapshot `protobuf:"bytes,6,rep,name=streams,proto3" json:"streams,omitempty"`
}

Service session

func (*SessionSnapshot) Descriptor

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

func (*SessionSnapshot) GetCommandSequence

func (m *SessionSnapshot) GetCommandSequence() uint64

func (*SessionSnapshot) GetLastApplied

func (m *SessionSnapshot) GetLastApplied() uint64

func (*SessionSnapshot) GetSessionID

func (m *SessionSnapshot) GetSessionID() uint64

func (*SessionSnapshot) GetStreams

func (m *SessionSnapshot) GetStreams() []*SessionStreamSnapshot

func (*SessionSnapshot) GetTimeout

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

func (*SessionSnapshot) GetTimestamp

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

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 SessionStreamSnapshot

type SessionStreamSnapshot struct {
	StreamId       uint64 `protobuf:"varint,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Type           string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	SequenceNumber uint64 `protobuf:"varint,3,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	LastCompleted  uint64 `protobuf:"varint,4,opt,name=last_completed,json=lastCompleted,proto3" json:"last_completed,omitempty"`
}

Service session stream

func (*SessionStreamSnapshot) Descriptor

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

func (*SessionStreamSnapshot) GetLastCompleted

func (m *SessionStreamSnapshot) GetLastCompleted() uint64

func (*SessionStreamSnapshot) GetSequenceNumber

func (m *SessionStreamSnapshot) GetSequenceNumber() uint64

func (*SessionStreamSnapshot) GetStreamId

func (m *SessionStreamSnapshot) GetStreamId() uint64

func (*SessionStreamSnapshot) GetType

func (m *SessionStreamSnapshot) GetType() string

func (*SessionStreamSnapshot) Marshal

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

func (*SessionStreamSnapshot) MarshalTo

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

func (*SessionStreamSnapshot) MarshalToSizedBuffer

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

func (*SessionStreamSnapshot) ProtoMessage

func (*SessionStreamSnapshot) ProtoMessage()

func (*SessionStreamSnapshot) Reset

func (m *SessionStreamSnapshot) Reset()

func (*SessionStreamSnapshot) Size

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

func (*SessionStreamSnapshot) String

func (m *SessionStreamSnapshot) String() string

func (*SessionStreamSnapshot) Unmarshal

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

func (*SessionStreamSnapshot) XXX_DiscardUnknown

func (m *SessionStreamSnapshot) XXX_DiscardUnknown()

func (*SessionStreamSnapshot) XXX_Marshal

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

func (*SessionStreamSnapshot) XXX_Merge

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

func (*SessionStreamSnapshot) XXX_Size

func (m *SessionStreamSnapshot) XXX_Size() int

func (*SessionStreamSnapshot) XXX_Unmarshal

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

type SessionizedService

type SessionizedService struct {
	Service
	// contains filtered or unexported fields
}

SessionizedService is a Service implementation for primitives that support sessions

func NewSessionizedService

func NewSessionizedService(parent Context) *SessionizedService

NewSessionizedService returns an initialized SessionizedService

func (*SessionizedService) CanDelete

func (s *SessionizedService) CanDelete(index uint64) bool

CanDelete returns a boolean indicating whether entries up to the given index can be deleted

func (*SessionizedService) Command

func (s *SessionizedService) Command(bytes []byte, stream streams.WriteStream)

Command handles a service command

func (*SessionizedService) Install

func (s *SessionizedService) Install(reader io.Reader) error

Install installs a snapshot of the service

func (*SessionizedService) OnClose

func (s *SessionizedService) OnClose(f func(*Session))

OnClose is called when a session is closed by the client

func (*SessionizedService) OnExpire

func (s *SessionizedService) OnExpire(f func(*Session))

OnExpire is called when a session is expired by the server

func (*SessionizedService) OnOpen

func (s *SessionizedService) OnOpen(f func(*Session))

OnOpen is called when a session is opened

func (*SessionizedService) Query

func (s *SessionizedService) Query(bytes []byte, stream streams.WriteStream)

Query handles a service query

func (*SessionizedService) Session

func (s *SessionizedService) Session() *Session

Session returns the currently active session

func (*SessionizedService) Sessions

func (s *SessionizedService) Sessions() map[uint64]*Session

Sessions returns a map of currently active sessions

func (*SessionizedService) Snapshot

func (s *SessionizedService) Snapshot(writer io.Writer) error

Snapshot takes a snapshot of the service

type SessionizedServiceSnapshot

type SessionizedServiceSnapshot struct {
	Index     uint64             `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Timestamp uint64             `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Sessions  []*SessionSnapshot `protobuf:"bytes,3,rep,name=sessions,proto3" json:"sessions,omitempty"`
}

Sessionized service snapshot

func (*SessionizedServiceSnapshot) Descriptor

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

func (*SessionizedServiceSnapshot) GetIndex

func (m *SessionizedServiceSnapshot) GetIndex() uint64

func (*SessionizedServiceSnapshot) GetSessions

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

func (*SessionizedServiceSnapshot) GetTimestamp

func (m *SessionizedServiceSnapshot) GetTimestamp() uint64

func (*SessionizedServiceSnapshot) Marshal

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

func (*SessionizedServiceSnapshot) MarshalTo

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

func (*SessionizedServiceSnapshot) MarshalToSizedBuffer

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

func (*SessionizedServiceSnapshot) ProtoMessage

func (*SessionizedServiceSnapshot) ProtoMessage()

func (*SessionizedServiceSnapshot) Reset

func (m *SessionizedServiceSnapshot) Reset()

func (*SessionizedServiceSnapshot) Size

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

func (*SessionizedServiceSnapshot) String

func (m *SessionizedServiceSnapshot) String() string

func (*SessionizedServiceSnapshot) Unmarshal

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

func (*SessionizedServiceSnapshot) XXX_DiscardUnknown

func (m *SessionizedServiceSnapshot) XXX_DiscardUnknown()

func (*SessionizedServiceSnapshot) XXX_Marshal

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

func (*SessionizedServiceSnapshot) XXX_Merge

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

func (*SessionizedServiceSnapshot) XXX_Size

func (m *SessionizedServiceSnapshot) XXX_Size() int

func (*SessionizedServiceSnapshot) XXX_Unmarshal

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

type SetRequest

type SetRequest struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

Set request

func (*SetRequest) Descriptor

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

func (*SetRequest) GetValue

func (m *SetRequest) GetValue() string

func (*SetRequest) Marshal

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

func (*SetRequest) MarshalTo

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

func (*SetRequest) MarshalToSizedBuffer

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

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) Reset

func (m *SetRequest) Reset()

func (*SetRequest) Size

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

func (*SetRequest) String

func (m *SetRequest) String() string

func (*SetRequest) Unmarshal

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

func (*SetRequest) XXX_DiscardUnknown

func (m *SetRequest) XXX_DiscardUnknown()

func (*SetRequest) XXX_Marshal

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

func (*SetRequest) XXX_Merge

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

func (*SetRequest) XXX_Size

func (m *SetRequest) XXX_Size() int

func (*SetRequest) XXX_Unmarshal

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

type SetResponse

type SetResponse struct {
}

Set response

func (*SetResponse) Descriptor

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

func (*SetResponse) Marshal

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

func (*SetResponse) MarshalTo

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

func (*SetResponse) MarshalToSizedBuffer

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

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) Reset

func (m *SetResponse) Reset()

func (*SetResponse) Size

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

func (*SetResponse) String

func (m *SetResponse) String() string

func (*SetResponse) Unmarshal

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

func (*SetResponse) XXX_DiscardUnknown

func (m *SetResponse) XXX_DiscardUnknown()

func (*SetResponse) XXX_Marshal

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

func (*SetResponse) XXX_Merge

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

func (*SetResponse) XXX_Size

func (m *SetResponse) XXX_Size() int

func (*SetResponse) XXX_Unmarshal

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

type SimpleService

type SimpleService struct {
	Service
	// contains filtered or unexported fields
}

SimpleService is a Service implementation for primitive that do not support sessions

func NewSimpleService

func NewSimpleService(parent Context) *SimpleService

NewSimpleService returns a new simple primitive service

func (*SimpleService) Command

func (s *SimpleService) Command(bytes []byte, stream streams.WriteStream)

Command handles a service command

func (*SimpleService) Install

func (s *SimpleService) Install(reader io.Reader) error

Install installs a snapshot to the service

func (*SimpleService) Query

func (s *SimpleService) Query(bytes []byte, stream streams.WriteStream)

Query handles a service query

func (*SimpleService) Snapshot

func (s *SimpleService) Snapshot(writer io.Writer) error

Snapshot takes a snapshot of the service

type SimpleServiceSnapshot

type SimpleServiceSnapshot struct {
	Index     int64      `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	Timestamp *time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp,omitempty"`
}

Simple service snapshot

func (*SimpleServiceSnapshot) Descriptor

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

func (*SimpleServiceSnapshot) GetIndex

func (m *SimpleServiceSnapshot) GetIndex() int64

func (*SimpleServiceSnapshot) GetTimestamp

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

func (*SimpleServiceSnapshot) Marshal

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

func (*SimpleServiceSnapshot) MarshalTo

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

func (*SimpleServiceSnapshot) MarshalToSizedBuffer

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

func (*SimpleServiceSnapshot) ProtoMessage

func (*SimpleServiceSnapshot) ProtoMessage()

func (*SimpleServiceSnapshot) Reset

func (m *SimpleServiceSnapshot) Reset()

func (*SimpleServiceSnapshot) Size

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

func (*SimpleServiceSnapshot) String

func (m *SimpleServiceSnapshot) String() string

func (*SimpleServiceSnapshot) Unmarshal

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

func (*SimpleServiceSnapshot) XXX_DiscardUnknown

func (m *SimpleServiceSnapshot) XXX_DiscardUnknown()

func (*SimpleServiceSnapshot) XXX_Marshal

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

func (*SimpleServiceSnapshot) XXX_Merge

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

func (*SimpleServiceSnapshot) XXX_Size

func (m *SimpleServiceSnapshot) XXX_Size() int

func (*SimpleServiceSnapshot) XXX_Unmarshal

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

type StreamingOperation

type StreamingOperation interface {
	// Execute executes the operation
	Execute(bytes []byte, stream stream.WriteStream)
}

StreamingOperation is a primitive operation that returns a stream

type TestService

type TestService struct {
	*SessionizedService
	// contains filtered or unexported fields
}

TestService is a state machine for a test primitive

func (*TestService) Backup

func (s *TestService) Backup() ([]byte, error)

Backup backs up the map service

func (*TestService) Get

func (s *TestService) Get(value []byte) ([]byte, error)

Get gets the value

func (*TestService) Restore

func (s *TestService) Restore(bytes []byte) error

Restore restores the map service

func (*TestService) Set

func (s *TestService) Set(value []byte) ([]byte, error)

Set sets the value

type TestValueSnapshot

type TestValueSnapshot struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

Test value snapshot

func (*TestValueSnapshot) Descriptor

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

func (*TestValueSnapshot) GetValue

func (m *TestValueSnapshot) GetValue() string

func (*TestValueSnapshot) Marshal

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

func (*TestValueSnapshot) MarshalTo

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

func (*TestValueSnapshot) MarshalToSizedBuffer

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

func (*TestValueSnapshot) ProtoMessage

func (*TestValueSnapshot) ProtoMessage()

func (*TestValueSnapshot) Reset

func (m *TestValueSnapshot) Reset()

func (*TestValueSnapshot) Size

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

func (*TestValueSnapshot) String

func (m *TestValueSnapshot) String() string

func (*TestValueSnapshot) Unmarshal

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

func (*TestValueSnapshot) XXX_DiscardUnknown

func (m *TestValueSnapshot) XXX_DiscardUnknown()

func (*TestValueSnapshot) XXX_Marshal

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

func (*TestValueSnapshot) XXX_Merge

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

func (*TestValueSnapshot) XXX_Size

func (m *TestValueSnapshot) XXX_Size() int

func (*TestValueSnapshot) XXX_Unmarshal

func (m *TestValueSnapshot) 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 UnaryOperation

type UnaryOperation interface {
	// Execute executes the operation
	Execute(bytes []byte) ([]byte, error)
}

UnaryOperation is a primitive operation that returns a result

Jump to

Keyboard shortcuts

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