Documentation
¶
Index ¶
- func Marshal(c *proto.Command) ([]byte, error)
- func MarshalLoadChunkRequest(lr *proto.LoadChunkRequest) ([]byte, error)
- func MarshalLoadRequest(lr *proto.LoadRequest) ([]byte, error)
- func MarshalNoop(c *proto.Noop) ([]byte, error)
- func Unmarshal(b []byte, c *proto.Command) error
- func UnmarshalLoadChunkRequest(b []byte, lr *proto.LoadChunkRequest) error
- func UnmarshalLoadRequest(b []byte, lr *proto.LoadRequest) error
- func UnmarshalNoop(b []byte, c *proto.Noop) error
- func UnmarshalSubCommand(c *proto.Command, m pb.Message) error
- type ExecuteQueryRequest
- type Parameter
- type QueryRequest_Level
- type Request
- type RequestMarshaler
- type Requester
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalLoadChunkRequest ¶
func MarshalLoadChunkRequest(lr *proto.LoadChunkRequest) ([]byte, error)
MarshalLoadChunkRequest marshals a LoadChunkRequest command
func MarshalLoadRequest ¶
func MarshalLoadRequest(lr *proto.LoadRequest) ([]byte, error)
MarshalLoadRequest marshals a LoadRequest command
func MarshalNoop ¶
MarshalNoop marshals a Noop command
func UnmarshalLoadChunkRequest ¶
func UnmarshalLoadChunkRequest(b []byte, lr *proto.LoadChunkRequest) error
UnmarshalLoadChunkRequest unmarshals a LoadChunkRequest command
func UnmarshalLoadRequest ¶
func UnmarshalLoadRequest(b []byte, lr *proto.LoadRequest) error
UnmarshalLoadRequest unmarshals a LoadRequest command
func UnmarshalNoop ¶
UnmarshalNoop unmarshals a Noop command
Types ¶
type ExecuteQueryRequest ¶
type ExecuteQueryRequest struct {
Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
Timings bool `protobuf:"varint,2,opt,name=timings,proto3" json:"timings,omitempty"`
Level QueryRequest_Level `protobuf:"varint,3,opt,name=level,proto3,enum=command.QueryRequest_Level" json:"level,omitempty"`
Freshness int64 `protobuf:"varint,4,opt,name=freshness,proto3" json:"freshness,omitempty"`
FreshnessStrict bool `protobuf:"varint,5,opt,name=freshness_strict,json=freshnessStrict,proto3" json:"freshness_strict,omitempty"`
// contains filtered or unexported fields
}
type Parameter ¶
type Parameter struct {
// Types that are assignable to Value:
//
// *Parameter_I
// *Parameter_D
// *Parameter_B
// *Parameter_Y
// *Parameter_S
Value isParameter_Value `protobuf_oneof:"value"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
Not yet completely implemented, need to think of all the edge cases
type QueryRequest_Level ¶
type QueryRequest_Level int32
const ( QueryRequest_QUERY_REQUEST_LEVEL_NONE QueryRequest_Level = 0 QueryRequest_QUERY_REQUEST_LEVEL_WEAK QueryRequest_Level = 1 QueryRequest_QUERY_REQUEST_LEVEL_STRONG QueryRequest_Level = 2 QueryRequest_QUERY_REQUEST_LEVEL_AUTO QueryRequest_Level = 3 )
type Request ¶
type Request struct {
Transaction bool `protobuf:"varint,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
Statements []*Statement `protobuf:"bytes,2,rep,name=statements,proto3" json:"statements,omitempty"`
DbTimeout int64 `protobuf:"varint,3,opt,name=dbTimeout,proto3" json:"dbTimeout,omitempty"`
// contains filtered or unexported fields
}
type RequestMarshaler ¶
RequestMarshaler marshals Request objects, potentially performing gzip compression.
func NewRequestMarshaler ¶
func NewRequestMarshaler() *RequestMarshaler
NewRequestMarshaler returns an initialized RequestMarshaler.
func (*RequestMarshaler) Marshal ¶
func (m *RequestMarshaler) Marshal(r Requester) ([]byte, bool, error)
Marshal marshals a Requester object, returning a byte slice, a bool indicating whether the contents are compressed, or an error.
func (*RequestMarshaler) Stats ¶
func (m *RequestMarshaler) Stats() map[string]interface{}
Stats returns status and diagnostic information about the RequestMarshaler.
type Statement ¶
type Statement struct {
Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"`
Parameters []*Parameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"`
ForceQuery bool `protobuf:"varint,3,opt,name=forceQuery,proto3" json:"forceQuery,omitempty"`
// contains filtered or unexported fields
}