Documentation ¶
Index ¶
- func RegisterPrimitiveServer(server *grpc.Server, client *Client, env env.DriverEnv)
- type Client
- type Partition
- type PartitionID
- type PartitionOutput
- type PrimitiveServer
- func (s *PrimitiveServer) Close(ctx context.Context, request *primitiveapi.CloseRequest) (*primitiveapi.CloseResponse, error)
- func (s *PrimitiveServer) Create(ctx context.Context, request *primitiveapi.CreateRequest) (*primitiveapi.CreateResponse, error)
- func (s *PrimitiveServer) Delete(ctx context.Context, request *primitiveapi.DeleteRequest) (*primitiveapi.DeleteResponse, error)
- type Protocol
- type Session
- func (s *Session) Close() error
- func (s *Session) DoCloseService(ctx context.Context, service rsm.ServiceId) error
- func (s *Session) DoCommand(ctx context.Context, service rsm.ServiceId, name string, input []byte) ([]byte, error)
- func (s *Session) DoCommandStream(ctx context.Context, service rsm.ServiceId, name string, input []byte, ...) error
- func (s *Session) DoCreateService(ctx context.Context, service rsm.ServiceId) error
- func (s *Session) DoDeleteService(ctx context.Context, service rsm.ServiceId) error
- func (s *Session) DoQuery(ctx context.Context, service rsm.ServiceId, name string, input []byte) ([]byte, error)
- func (s *Session) DoQueryStream(ctx context.Context, service rsm.ServiceId, name string, input []byte, ...) error
- type SessionOption
- type SessionOutput
- type StreamState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for communicating with the storage layer
func (*Client) Partition ¶
func (p *Client) Partition(partitionID PartitionID) *Partition
func (*Client) PartitionBy ¶
func (*Client) Partitions ¶
type Partition ¶
type Partition struct { cluster.Partition *Session ID PartitionID // contains filtered or unexported fields }
Partition is a proxy partition
func NewPartition ¶
NewPartition creates a new proxy partition
type PartitionOutput ¶
type PartitionOutput struct { streams.Result Type rsm.SessionResponseType Status rsm.SessionResponseStatus Context rsm.SessionResponseContext }
PartitionOutput is a result for session-supporting servers containing session header information
type PrimitiveServer ¶
type PrimitiveServer struct { *Client // contains filtered or unexported fields }
func (*PrimitiveServer) Close ¶
func (s *PrimitiveServer) Close(ctx context.Context, request *primitiveapi.CloseRequest) (*primitiveapi.CloseResponse, error)
func (*PrimitiveServer) Create ¶
func (s *PrimitiveServer) Create(ctx context.Context, request *primitiveapi.CreateRequest) (*primitiveapi.CreateResponse, error)
func (*PrimitiveServer) Delete ¶
func (s *PrimitiveServer) Delete(ctx context.Context, request *primitiveapi.DeleteRequest) (*primitiveapi.DeleteResponse, error)
type Protocol ¶
type Protocol struct { *server.Server Client *Client Env env.DriverEnv // contains filtered or unexported fields }
Protocol is a state machine protocol
func NewProtocol ¶
NewProtocol creates a new state machine protocol
func (*Protocol) Configure ¶
func (n *Protocol) Configure(config protocolapi.ProtocolConfig) error
Configure configures the protocol
func (*Protocol) Primitives ¶
func (n *Protocol) Primitives() *primitive.PrimitiveTypeRegistry
Primitives returns the protocol primitives
type Session ¶
type Session struct { Timeout time.Duration SessionID uint64 // contains filtered or unexported fields }
Session maintains the session for a primitive
func NewSession ¶
NewSession creates a new Session for the given partition name is the name of the primitive handler is the primitive's session handler
func (*Session) DoCloseService ¶
DoCloseService closes the service
func (*Session) DoCommand ¶
func (s *Session) DoCommand(ctx context.Context, service rsm.ServiceId, name string, input []byte) ([]byte, error)
DoCommand submits a command to the service
func (*Session) DoCommandStream ¶
func (s *Session) DoCommandStream(ctx context.Context, service rsm.ServiceId, name string, input []byte, outStream streams.WriteStream) error
DoCommandStream submits a streaming command to the service
func (*Session) DoCreateService ¶
DoCreateService creates the service
func (*Session) DoDeleteService ¶
DoDeleteService deletes the service
type SessionOption ¶
type SessionOption interface {
// contains filtered or unexported methods
}
SessionOption implements a session option
func WithSessionTimeout ¶
func WithSessionTimeout(timeout time.Duration) SessionOption
WithSessionTimeout returns a session SessionOption to configure the session timeout
type SessionOutput ¶
SessionOutput is a result for session-supporting servers containing session header information
type StreamState ¶
type StreamState struct { ID uint64 // contains filtered or unexported fields }
StreamState manages the context for a single response stream within a session
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. |
Code generated by atomix-go-framework.
|
Code generated by atomix-go-framework. |
Code generated by atomix-go-framework.
|
Code generated by atomix-go-framework. |