Documentation ¶
Index ¶
- Variables
- func Marshal(c *Command) ([]byte, error)
- func MarshalNoop(c *Noop) ([]byte, error)
- func Unmarshal(b []byte, c *Command) error
- func UnmarshalNoop(b []byte, c *Noop) error
- func UnmarshalSubCommand(c *Command, m proto.Message) error
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetCompressed() bool
- func (x *Command) GetSubCommand() []byte
- func (x *Command) GetType() Command_Type
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type Command_Type
- func (Command_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Command_Type) Enum() *Command_Type
- func (Command_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Command_Type) Number() protoreflect.EnumNumber
- func (x Command_Type) String() string
- func (Command_Type) Type() protoreflect.EnumType
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRequest) GetRequest() *Request
- func (x *ExecuteRequest) GetTimings() bool
- func (*ExecuteRequest) ProtoMessage()
- func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRequest) Reset()
- func (x *ExecuteRequest) String() string
- type Noop
- type Parameter
- func (*Parameter) Descriptor() ([]byte, []int)deprecated
- func (x *Parameter) GetB() bool
- func (x *Parameter) GetD() float64
- func (x *Parameter) GetI() int64
- func (x *Parameter) GetS() string
- func (m *Parameter) GetValue() isParameter_Value
- func (x *Parameter) GetY() []byte
- func (*Parameter) ProtoMessage()
- func (x *Parameter) ProtoReflect() protoreflect.Message
- func (x *Parameter) Reset()
- func (x *Parameter) String() string
- type Parameter_B
- type Parameter_D
- type Parameter_I
- type Parameter_S
- type Parameter_Y
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetFreshness() int64
- func (x *QueryRequest) GetLevel() QueryRequest_Level
- func (x *QueryRequest) GetRequest() *Request
- func (x *QueryRequest) GetTimings() bool
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryRequest_Level
- func (QueryRequest_Level) Descriptor() protoreflect.EnumDescriptor
- func (x QueryRequest_Level) Enum() *QueryRequest_Level
- func (QueryRequest_Level) EnumDescriptor() ([]byte, []int)deprecated
- func (x QueryRequest_Level) Number() protoreflect.EnumNumber
- func (x QueryRequest_Level) String() string
- func (QueryRequest_Level) Type() protoreflect.EnumType
- type Request
- type RequestMarshaler
- type Requester
- type Statement
Constants ¶
This section is empty.
Variables ¶
var ( QueryRequest_Level_name = map[int32]string{ 0: "QUERY_REQUEST_LEVEL_NONE", 1: "QUERY_REQUEST_LEVEL_WEAK", 2: "QUERY_REQUEST_LEVEL_STRONG", } QueryRequest_Level_value = map[string]int32{ "QUERY_REQUEST_LEVEL_NONE": 0, "QUERY_REQUEST_LEVEL_WEAK": 1, "QUERY_REQUEST_LEVEL_STRONG": 2, } )
Enum value maps for QueryRequest_Level.
var ( Command_Type_name = map[int32]string{ 0: "COMMAND_TYPE_UNKNOWN", 1: "COMMAND_TYPE_QUERY", 2: "COMMAND_TYPE_EXECUTE", 3: "COMMAND_TYPE_NOOP", } Command_Type_value = map[string]int32{ "COMMAND_TYPE_UNKNOWN": 0, "COMMAND_TYPE_QUERY": 1, "COMMAND_TYPE_EXECUTE": 2, "COMMAND_TYPE_NOOP": 3, } )
Enum value maps for Command_Type.
var File_command_proto protoreflect.FileDescriptor
Functions ¶
func UnmarshalNoop ¶
UnmarshalNoop unmarshals a Noop command
Types ¶
type Command ¶
type Command struct { Type Command_Type `protobuf:"varint,1,opt,name=type,proto3,enum=command.Command_Type" json:"type,omitempty"` SubCommand []byte `protobuf:"bytes,2,opt,name=sub_command,json=subCommand,proto3" json:"sub_command,omitempty"` Compressed bool `protobuf:"varint,3,opt,name=compressed,proto3" json:"compressed,omitempty"` // contains filtered or unexported fields }
func (*Command) Descriptor
deprecated
func (*Command) GetCompressed ¶
func (*Command) GetSubCommand ¶
func (*Command) GetType ¶
func (x *Command) GetType() Command_Type
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Command_Type ¶
type Command_Type int32
const ( Command_COMMAND_TYPE_UNKNOWN Command_Type = 0 Command_COMMAND_TYPE_QUERY Command_Type = 1 Command_COMMAND_TYPE_EXECUTE Command_Type = 2 Command_COMMAND_TYPE_NOOP Command_Type = 3 )
func (Command_Type) Descriptor ¶
func (Command_Type) Descriptor() protoreflect.EnumDescriptor
func (Command_Type) Enum ¶
func (x Command_Type) Enum() *Command_Type
func (Command_Type) EnumDescriptor
deprecated
func (Command_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Command_Type.Descriptor instead.
func (Command_Type) Number ¶
func (x Command_Type) Number() protoreflect.EnumNumber
func (Command_Type) String ¶
func (x Command_Type) String() string
func (Command_Type) Type ¶
func (Command_Type) Type() protoreflect.EnumType
type ExecuteRequest ¶
type ExecuteRequest 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"` // contains filtered or unexported fields }
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetRequest ¶
func (x *ExecuteRequest) GetRequest() *Request
func (*ExecuteRequest) GetTimings ¶
func (x *ExecuteRequest) GetTimings() bool
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) ProtoReflect ¶
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
func (*ExecuteRequest) Reset ¶
func (x *ExecuteRequest) Reset()
func (*ExecuteRequest) String ¶
func (x *ExecuteRequest) String() string
type Noop ¶
type Noop struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Noop) Descriptor
deprecated
func (*Noop) ProtoMessage ¶
func (*Noop) ProtoMessage()
func (*Noop) ProtoReflect ¶
func (x *Noop) ProtoReflect() protoreflect.Message
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"` // contains filtered or unexported fields }
func (*Parameter) Descriptor
deprecated
func (*Parameter) ProtoMessage ¶
func (*Parameter) ProtoMessage()
func (*Parameter) ProtoReflect ¶
func (x *Parameter) ProtoReflect() protoreflect.Message
type Parameter_B ¶
type Parameter_B struct {
B bool `protobuf:"varint,3,opt,name=b,proto3,oneof"`
}
type Parameter_D ¶
type Parameter_D struct {
D float64 `protobuf:"fixed64,2,opt,name=d,proto3,oneof"`
}
type Parameter_I ¶
type Parameter_I struct {
I int64 `protobuf:"zigzag64,1,opt,name=i,proto3,oneof"`
}
type Parameter_S ¶
type Parameter_S struct {
S string `protobuf:"bytes,5,opt,name=s,proto3,oneof"`
}
type Parameter_Y ¶
type Parameter_Y struct {
Y []byte `protobuf:"bytes,4,opt,name=y,proto3,oneof"`
}
type QueryRequest ¶
type QueryRequest 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"` // contains filtered or unexported fields }
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetFreshness ¶
func (x *QueryRequest) GetFreshness() int64
func (*QueryRequest) GetLevel ¶
func (x *QueryRequest) GetLevel() QueryRequest_Level
func (*QueryRequest) GetRequest ¶
func (x *QueryRequest) GetRequest() *Request
func (*QueryRequest) GetTimings ¶
func (x *QueryRequest) GetTimings() bool
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
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 )
func (QueryRequest_Level) Descriptor ¶
func (QueryRequest_Level) Descriptor() protoreflect.EnumDescriptor
func (QueryRequest_Level) Enum ¶
func (x QueryRequest_Level) Enum() *QueryRequest_Level
func (QueryRequest_Level) EnumDescriptor
deprecated
func (QueryRequest_Level) EnumDescriptor() ([]byte, []int)
Deprecated: Use QueryRequest_Level.Descriptor instead.
func (QueryRequest_Level) Number ¶
func (x QueryRequest_Level) Number() protoreflect.EnumNumber
func (QueryRequest_Level) String ¶
func (x QueryRequest_Level) String() string
func (QueryRequest_Level) Type ¶
func (QueryRequest_Level) Type() protoreflect.EnumType
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"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetStatements ¶
func (*Request) GetTransaction ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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"` // contains filtered or unexported fields }
func (*Statement) Descriptor
deprecated
func (*Statement) GetParameters ¶
func (*Statement) ProtoMessage ¶
func (*Statement) ProtoMessage()
func (*Statement) ProtoReflect ¶
func (x *Statement) ProtoReflect() protoreflect.Message