Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterRobotCtlServer(s *grpc.Server, srv RobotCtlServer)
- func Serve(strategy Strategy)
- func SetValue(key string, value Value) error
- func ToBool(value interface{}) bool
- func ToFloat(value interface{}) float64
- func ToFloat32(value interface{}) float32
- func ToInt(value interface{}) int
- func ToInt64(value interface{}) int64
- func ToUint64(value interface{}) uint64
- type AfterOptionsChanged
- type BaseStrategy
- func (s *BaseStrategy) GetCommand() *Command
- func (s *BaseStrategy) GetOptions() (optionMap map[string]*OptionInfo)
- func (s *BaseStrategy) GetProxy() string
- func (s *BaseStrategy) GetState() RobotStatus
- func (s *BaseStrategy) GetValue(key string) (Value, error)
- func (s *BaseStrategy) IsRunning() bool
- func (s *BaseStrategy) Pause() plugin.BasicError
- func (s *BaseStrategy) QueueCommand(command string) plugin.BasicError
- func (s *BaseStrategy) QueueCommandRaw(command Command)
- func (s *BaseStrategy) SetOptions(options map[string]interface{}) plugin.BasicError
- func (s *BaseStrategy) SetProxy(proxy string)
- func (s *BaseStrategy) SetSelf(self Strategy)
- func (s *BaseStrategy) SetValue(key string, value Value) error
- func (s *BaseStrategy) Start() plugin.BasicError
- func (s *BaseStrategy) Stop() plugin.BasicError
- func (s *BaseStrategy) UpdateStat(name string, value []byte) error
- type Client
- func (c Client) Close()
- func (c *Client) GetRobotExchangeInfo(uid string, id string) ([]*RobotExchangeInfo, error)
- func (c *Client) GetRobotOptions(uid string, id string) ([]*RobotOption, error)
- func (c *Client) GetValue(key string) (Value, error)
- func (c *Client) Log(sid int, id uint64, tm int64, level int32, message string) error
- func (c *Client) SetValue(key string, value Value) error
- func (c *Client) UpdateStat(name string, value []byte) error
- func (c *Client) UpdateStatus(robotID string, status RobotStatus) error
- type Command
- type ExchangeParams
- type GRPCLog
- type GetValueReply
- func (*GetValueReply) Descriptor() ([]byte, []int)
- func (m *GetValueReply) GetMessage() string
- func (m *GetValueReply) GetSuccess() bool
- func (m *GetValueReply) GetValue() []byte
- func (*GetValueReply) ProtoMessage()
- func (m *GetValueReply) Reset()
- func (m *GetValueReply) String() string
- func (m *GetValueReply) XXX_DiscardUnknown()
- func (m *GetValueReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetValueReply) XXX_Merge(src proto.Message)
- func (m *GetValueReply) XXX_Size() int
- func (m *GetValueReply) XXX_Unmarshal(b []byte) error
- type GetValueRequest
- func (*GetValueRequest) Descriptor() ([]byte, []int)
- func (m *GetValueRequest) GetKey() string
- func (m *GetValueRequest) GetRobotId() string
- func (*GetValueRequest) ProtoMessage()
- func (m *GetValueRequest) Reset()
- func (m *GetValueRequest) String() string
- func (m *GetValueRequest) XXX_DiscardUnknown()
- func (m *GetValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetValueRequest) XXX_Merge(src proto.Message)
- func (m *GetValueRequest) XXX_Size() int
- func (m *GetValueRequest) XXX_Unmarshal(b []byte) error
- type LogReply
- func (*LogReply) Descriptor() ([]byte, []int)
- func (m *LogReply) GetMessage() string
- func (m *LogReply) GetSuccess() bool
- func (*LogReply) ProtoMessage()
- func (m *LogReply) Reset()
- func (m *LogReply) String() string
- func (m *LogReply) XXX_DiscardUnknown()
- func (m *LogReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogReply) XXX_Merge(src proto.Message)
- func (m *LogReply) XXX_Size() int
- func (m *LogReply) XXX_Unmarshal(b []byte) error
- type LogRequest
- func (*LogRequest) Descriptor() ([]byte, []int)
- func (m *LogRequest) GetId() uint64
- func (m *LogRequest) GetLevel() int32
- func (m *LogRequest) GetMessage() string
- func (m *LogRequest) GetSid() int32
- func (m *LogRequest) GetTime() int64
- func (*LogRequest) ProtoMessage()
- func (m *LogRequest) Reset()
- func (m *LogRequest) String() string
- func (m *LogRequest) XXX_DiscardUnknown()
- func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogRequest) XXX_Merge(src proto.Message)
- func (m *LogRequest) XXX_Size() int
- func (m *LogRequest) XXX_Unmarshal(b []byte) error
- type OptionInfo
- type RobotCtlClient
- type RobotCtlServer
- type RobotExchangeInfo
- func (*RobotExchangeInfo) Descriptor() ([]byte, []int)
- func (m *RobotExchangeInfo) GetAccessKey() string
- func (m *RobotExchangeInfo) GetLabel() string
- func (m *RobotExchangeInfo) GetName() string
- func (m *RobotExchangeInfo) GetSecretKey() string
- func (*RobotExchangeInfo) ProtoMessage()
- func (m *RobotExchangeInfo) Reset()
- func (m *RobotExchangeInfo) String() string
- func (m *RobotExchangeInfo) XXX_DiscardUnknown()
- func (m *RobotExchangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotExchangeInfo) XXX_Merge(src proto.Message)
- func (m *RobotExchangeInfo) XXX_Size() int
- func (m *RobotExchangeInfo) XXX_Unmarshal(b []byte) error
- type RobotExchangeInfoReply
- func (*RobotExchangeInfoReply) Descriptor() ([]byte, []int)
- func (m *RobotExchangeInfoReply) GetExchanges() []*RobotExchangeInfo
- func (*RobotExchangeInfoReply) ProtoMessage()
- func (m *RobotExchangeInfoReply) Reset()
- func (m *RobotExchangeInfoReply) String() string
- func (m *RobotExchangeInfoReply) XXX_DiscardUnknown()
- func (m *RobotExchangeInfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotExchangeInfoReply) XXX_Merge(src proto.Message)
- func (m *RobotExchangeInfoReply) XXX_Size() int
- func (m *RobotExchangeInfoReply) XXX_Unmarshal(b []byte) error
- type RobotExchangeInfoRequest
- func (*RobotExchangeInfoRequest) Descriptor() ([]byte, []int)
- func (m *RobotExchangeInfoRequest) GetRobotId() string
- func (m *RobotExchangeInfoRequest) GetUid() string
- func (*RobotExchangeInfoRequest) ProtoMessage()
- func (m *RobotExchangeInfoRequest) Reset()
- func (m *RobotExchangeInfoRequest) String() string
- func (m *RobotExchangeInfoRequest) XXX_DiscardUnknown()
- func (m *RobotExchangeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotExchangeInfoRequest) XXX_Merge(src proto.Message)
- func (m *RobotExchangeInfoRequest) XXX_Size() int
- func (m *RobotExchangeInfoRequest) XXX_Unmarshal(b []byte) error
- type RobotOption
- func (*RobotOption) Descriptor() ([]byte, []int)
- func (m *RobotOption) GetKey() string
- func (m *RobotOption) GetValue() string
- func (*RobotOption) ProtoMessage()
- func (m *RobotOption) Reset()
- func (m *RobotOption) String() string
- func (m *RobotOption) XXX_DiscardUnknown()
- func (m *RobotOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotOption) XXX_Merge(src proto.Message)
- func (m *RobotOption) XXX_Size() int
- func (m *RobotOption) XXX_Unmarshal(b []byte) error
- type RobotOptionsReply
- func (*RobotOptionsReply) Descriptor() ([]byte, []int)
- func (m *RobotOptionsReply) GetOptions() []*RobotOption
- func (*RobotOptionsReply) ProtoMessage()
- func (m *RobotOptionsReply) Reset()
- func (m *RobotOptionsReply) String() string
- func (m *RobotOptionsReply) XXX_DiscardUnknown()
- func (m *RobotOptionsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotOptionsReply) XXX_Merge(src proto.Message)
- func (m *RobotOptionsReply) XXX_Size() int
- func (m *RobotOptionsReply) XXX_Unmarshal(b []byte) error
- type RobotOptionsRequest
- func (*RobotOptionsRequest) Descriptor() ([]byte, []int)
- func (m *RobotOptionsRequest) GetRobotId() string
- func (m *RobotOptionsRequest) GetUid() string
- func (*RobotOptionsRequest) ProtoMessage()
- func (m *RobotOptionsRequest) Reset()
- func (m *RobotOptionsRequest) String() string
- func (m *RobotOptionsRequest) XXX_DiscardUnknown()
- func (m *RobotOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RobotOptionsRequest) XXX_Merge(src proto.Message)
- func (m *RobotOptionsRequest) XXX_Size() int
- func (m *RobotOptionsRequest) XXX_Unmarshal(b []byte) error
- type RobotStatus
- type SetValueReply
- func (*SetValueReply) Descriptor() ([]byte, []int)
- func (m *SetValueReply) GetMessage() string
- func (m *SetValueReply) GetSuccess() bool
- func (*SetValueReply) ProtoMessage()
- func (m *SetValueReply) Reset()
- func (m *SetValueReply) String() string
- func (m *SetValueReply) XXX_DiscardUnknown()
- func (m *SetValueReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetValueReply) XXX_Merge(src proto.Message)
- func (m *SetValueReply) XXX_Size() int
- func (m *SetValueReply) XXX_Unmarshal(b []byte) error
- type SetValueRequest
- func (*SetValueRequest) Descriptor() ([]byte, []int)
- func (m *SetValueRequest) GetKey() string
- func (m *SetValueRequest) GetRobotId() string
- func (m *SetValueRequest) GetValue() []byte
- func (*SetValueRequest) ProtoMessage()
- func (m *SetValueRequest) Reset()
- func (m *SetValueRequest) String() string
- func (m *SetValueRequest) XXX_DiscardUnknown()
- func (m *SetValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetValueRequest) XXX_Merge(src proto.Message)
- func (m *SetValueRequest) XXX_Size() int
- func (m *SetValueRequest) XXX_Unmarshal(b []byte) error
- type StatReply
- func (*StatReply) Descriptor() ([]byte, []int)
- func (m *StatReply) GetMessage() string
- func (m *StatReply) GetSuccess() bool
- func (*StatReply) ProtoMessage()
- func (m *StatReply) Reset()
- func (m *StatReply) String() string
- func (m *StatReply) XXX_DiscardUnknown()
- func (m *StatReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatReply) XXX_Merge(src proto.Message)
- func (m *StatReply) XXX_Size() int
- func (m *StatReply) XXX_Unmarshal(b []byte) error
- type StatRequest
- func (*StatRequest) Descriptor() ([]byte, []int)
- func (m *StatRequest) GetName() string
- func (m *StatRequest) GetRobotId() string
- func (m *StatRequest) GetValue() []byte
- func (*StatRequest) ProtoMessage()
- func (m *StatRequest) Reset()
- func (m *StatRequest) String() string
- func (m *StatRequest) XXX_DiscardUnknown()
- func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatRequest) XXX_Merge(src proto.Message)
- func (m *StatRequest) XXX_Size() int
- func (m *StatRequest) XXX_Unmarshal(b []byte) error
- type Strategy
- type StrategyCtl
- type StrategyPlugin
- type StrategyRPC
- func (g *StrategyRPC) GetOptions() (optionMap map[string]*OptionInfo)
- func (g *StrategyRPC) GetState() RobotStatus
- func (g *StrategyRPC) Pause() plugin.BasicError
- func (g *StrategyRPC) QueueCommand(command string) plugin.BasicError
- func (g *StrategyRPC) SetOptions(options map[string]interface{}) plugin.BasicError
- func (g *StrategyRPC) Start() plugin.BasicError
- func (g *StrategyRPC) Stop() plugin.BasicError
- type StrategyRPCServer
- func (s *StrategyRPCServer) GetOptions(args interface{}, resp *map[string]*OptionInfo) error
- func (s *StrategyRPCServer) GetState(args interface{}, resp *RobotStatus) error
- func (s *StrategyRPCServer) Pause(args interface{}, resp *plugin.BasicError) error
- func (s *StrategyRPCServer) QueueCommand(args string, resp *plugin.BasicError) error
- func (s *StrategyRPCServer) SetOptions(args map[string]interface{}, resp *plugin.BasicError) error
- func (s *StrategyRPCServer) Start(args interface{}, resp *plugin.BasicError) error
- func (s *StrategyRPCServer) Stop(args interface{}, resp *plugin.BasicError) error
- type UpdateStatusReply
- func (*UpdateStatusReply) Descriptor() ([]byte, []int)
- func (m *UpdateStatusReply) GetMessage() string
- func (m *UpdateStatusReply) GetSuccess() bool
- func (*UpdateStatusReply) ProtoMessage()
- func (m *UpdateStatusReply) Reset()
- func (m *UpdateStatusReply) String() string
- func (m *UpdateStatusReply) XXX_DiscardUnknown()
- func (m *UpdateStatusReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateStatusReply) XXX_Merge(src proto.Message)
- func (m *UpdateStatusReply) XXX_Size() int
- func (m *UpdateStatusReply) XXX_Unmarshal(b []byte) error
- type UpdateStatusRequest
- func (*UpdateStatusRequest) Descriptor() ([]byte, []int)
- func (m *UpdateStatusRequest) GetRobotId() string
- func (m *UpdateStatusRequest) GetStatus() int32
- func (*UpdateStatusRequest) ProtoMessage()
- func (m *UpdateStatusRequest) Reset()
- func (m *UpdateStatusRequest) String() string
- func (m *UpdateStatusRequest) XXX_DiscardUnknown()
- func (m *UpdateStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateStatusRequest) XXX_Merge(src proto.Message)
- func (m *UpdateStatusRequest) XXX_Size() int
- func (m *UpdateStatusRequest) XXX_Unmarshal(b []byte) error
- type Value
- func (r *Value) DecodeMsgpack(enc *msgpack.Decoder) error
- func (r *Value) EncodeMsgpack(enc *msgpack.Encoder) error
- func (value *Value) SetValue(val interface{})
- func (value *Value) ToBool() bool
- func (value *Value) ToFloat64() float64
- func (value *Value) ToInt() int
- func (value *Value) ToString() string
- type ValueKind
Constants ¶
const (
// OptionTag 选项Tag
OptionTag = "option"
)
const (
PluginMapStrategyCtlKey = "strategyCtl"
)
Variables ¶
var ( // ErrNotFound is returned when an item or index is not in the database. ErrNotFound = errors.New("not found") )
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: plugin.CoreProtocolVersion,
MagicCookieKey: "STRATEGY_PLUGIN",
MagicCookieValue: "QtMWr4VtAC*r",
}
pluginMap is the map of plugins we can dispense.
var PluginMap = map[string]plugin.Plugin{ PluginMapStrategyCtlKey: &StrategyPlugin{}, }
Functions ¶
func RegisterRobotCtlServer ¶
func RegisterRobotCtlServer(s *grpc.Server, srv RobotCtlServer)
Types ¶
type AfterOptionsChanged ¶
type AfterOptionsChanged interface {
AfterOptionsChanged()
}
AfterOptionsChanged 策略参数改变接口,实现此接口的策略,在动态改变参数后触发此方法
type BaseStrategy ¶
type BaseStrategy struct {
// contains filtered or unexported fields
}
BaseStrategy 策略基础类
func (*BaseStrategy) GetOptions ¶
func (s *BaseStrategy) GetOptions() (optionMap map[string]*OptionInfo)
GetOptions 获取参数
func (*BaseStrategy) GetValue ¶
func (s *BaseStrategy) GetValue(key string) (Value, error)
GetValue 获取一个全局变量
func (*BaseStrategy) QueueCommand ¶
func (s *BaseStrategy) QueueCommand(command string) plugin.BasicError
QueueCommand 命令入队列
func (*BaseStrategy) QueueCommandRaw ¶
func (s *BaseStrategy) QueueCommandRaw(command Command)
QueueCommandRaw 命令入队列
func (*BaseStrategy) SetOptions ¶
func (s *BaseStrategy) SetOptions(options map[string]interface{}) plugin.BasicError
SetOptions 设置参数
func (*BaseStrategy) SetProxy ¶
func (s *BaseStrategy) SetProxy(proxy string)
SetProxy 设置访问网络的代理(主要方便本地测试,如:http://127.0.0.1:1080)
func (*BaseStrategy) SetValue ¶
func (s *BaseStrategy) SetValue(key string, value Value) error
SetValue 设置一个全局变量
func (*BaseStrategy) UpdateStat ¶
func (s *BaseStrategy) UpdateStat(name string, value []byte) error
UpdateStat 更新统计数据
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client RPC客户端对象
func (*Client) GetRobotExchangeInfo ¶
func (c *Client) GetRobotExchangeInfo(uid string, id string) ([]*RobotExchangeInfo, error)
func (*Client) GetRobotOptions ¶
func (c *Client) GetRobotOptions(uid string, id string) ([]*RobotOption, error)
func (*Client) UpdateStatus ¶
func (c *Client) UpdateStatus(robotID string, status RobotStatus) error
type ExchangeParams ¶
ExchangeParams 初始化交易所所需参数
type GetValueReply ¶
type GetValueReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetValueReply) Descriptor ¶
func (*GetValueReply) Descriptor() ([]byte, []int)
func (*GetValueReply) GetMessage ¶
func (m *GetValueReply) GetMessage() string
func (*GetValueReply) GetSuccess ¶
func (m *GetValueReply) GetSuccess() bool
func (*GetValueReply) GetValue ¶
func (m *GetValueReply) GetValue() []byte
func (*GetValueReply) ProtoMessage ¶
func (*GetValueReply) ProtoMessage()
func (*GetValueReply) Reset ¶
func (m *GetValueReply) Reset()
func (*GetValueReply) String ¶
func (m *GetValueReply) String() string
func (*GetValueReply) XXX_DiscardUnknown ¶
func (m *GetValueReply) XXX_DiscardUnknown()
func (*GetValueReply) XXX_Marshal ¶
func (m *GetValueReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetValueReply) XXX_Merge ¶
func (m *GetValueReply) XXX_Merge(src proto.Message)
func (*GetValueReply) XXX_Size ¶
func (m *GetValueReply) XXX_Size() int
func (*GetValueReply) XXX_Unmarshal ¶
func (m *GetValueReply) XXX_Unmarshal(b []byte) error
type GetValueRequest ¶
type GetValueRequest struct { RobotId string `protobuf:"bytes,1,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetValueRequest) Descriptor ¶
func (*GetValueRequest) Descriptor() ([]byte, []int)
func (*GetValueRequest) GetKey ¶
func (m *GetValueRequest) GetKey() string
func (*GetValueRequest) GetRobotId ¶
func (m *GetValueRequest) GetRobotId() string
func (*GetValueRequest) ProtoMessage ¶
func (*GetValueRequest) ProtoMessage()
func (*GetValueRequest) Reset ¶
func (m *GetValueRequest) Reset()
func (*GetValueRequest) String ¶
func (m *GetValueRequest) String() string
func (*GetValueRequest) XXX_DiscardUnknown ¶
func (m *GetValueRequest) XXX_DiscardUnknown()
func (*GetValueRequest) XXX_Marshal ¶
func (m *GetValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetValueRequest) XXX_Merge ¶
func (m *GetValueRequest) XXX_Merge(src proto.Message)
func (*GetValueRequest) XXX_Size ¶
func (m *GetValueRequest) XXX_Size() int
func (*GetValueRequest) XXX_Unmarshal ¶
func (m *GetValueRequest) XXX_Unmarshal(b []byte) error
type LogReply ¶
type LogReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LogReply) Descriptor ¶
func (*LogReply) GetMessage ¶
func (*LogReply) GetSuccess ¶
func (*LogReply) ProtoMessage ¶
func (*LogReply) ProtoMessage()
func (*LogReply) XXX_DiscardUnknown ¶
func (m *LogReply) XXX_DiscardUnknown()
func (*LogReply) XXX_Marshal ¶
func (*LogReply) XXX_Unmarshal ¶
type LogRequest ¶
type LogRequest struct { Sid int32 `protobuf:"varint,1,opt,name=sid,proto3" json:"sid,omitempty"` Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` Level int32 `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"` Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LogRequest) Descriptor ¶
func (*LogRequest) Descriptor() ([]byte, []int)
func (*LogRequest) GetId ¶
func (m *LogRequest) GetId() uint64
func (*LogRequest) GetLevel ¶
func (m *LogRequest) GetLevel() int32
func (*LogRequest) GetMessage ¶
func (m *LogRequest) GetMessage() string
func (*LogRequest) GetSid ¶
func (m *LogRequest) GetSid() int32
func (*LogRequest) GetTime ¶
func (m *LogRequest) GetTime() int64
func (*LogRequest) ProtoMessage ¶
func (*LogRequest) ProtoMessage()
func (*LogRequest) Reset ¶
func (m *LogRequest) Reset()
func (*LogRequest) String ¶
func (m *LogRequest) String() string
func (*LogRequest) XXX_DiscardUnknown ¶
func (m *LogRequest) XXX_DiscardUnknown()
func (*LogRequest) XXX_Marshal ¶
func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LogRequest) XXX_Merge ¶
func (m *LogRequest) XXX_Merge(src proto.Message)
func (*LogRequest) XXX_Size ¶
func (m *LogRequest) XXX_Size() int
func (*LogRequest) XXX_Unmarshal ¶
func (m *LogRequest) XXX_Unmarshal(b []byte) error
type OptionInfo ¶
type OptionInfo struct { Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` Value interface{} `json:"value"` DefaultValue interface{} `json:"default_value"` }
OptionInfo 参数信息
type RobotCtlClient ¶
type RobotCtlClient interface { // 获取运行参数 GetRobotOptions(ctx context.Context, in *RobotOptionsRequest, opts ...grpc.CallOption) (*RobotOptionsReply, error) // 获取交易所配置 GetRobotExchangeInfo(ctx context.Context, in *RobotExchangeInfoRequest, opts ...grpc.CallOption) (*RobotExchangeInfoReply, error) // 获取配置值 GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueReply, error) // 保存配置值 SetValue(ctx context.Context, in *SetValueRequest, opts ...grpc.CallOption) (*SetValueReply, error) // 写入日志 Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*LogReply, error) // 更新状态 UpdateStatus(ctx context.Context, in *UpdateStatusRequest, opts ...grpc.CallOption) (*UpdateStatusReply, error) // 更新统计数据 UpdateStat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatReply, error) }
RobotCtlClient is the client API for RobotCtl service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRobotCtlClient ¶
func NewRobotCtlClient(cc *grpc.ClientConn) RobotCtlClient
type RobotCtlServer ¶
type RobotCtlServer interface { // 获取运行参数 GetRobotOptions(context.Context, *RobotOptionsRequest) (*RobotOptionsReply, error) // 获取交易所配置 GetRobotExchangeInfo(context.Context, *RobotExchangeInfoRequest) (*RobotExchangeInfoReply, error) // 获取配置值 GetValue(context.Context, *GetValueRequest) (*GetValueReply, error) // 保存配置值 SetValue(context.Context, *SetValueRequest) (*SetValueReply, error) // 写入日志 Log(context.Context, *LogRequest) (*LogReply, error) // 更新状态 UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusReply, error) // 更新统计数据 UpdateStat(context.Context, *StatRequest) (*StatReply, error) }
RobotCtlServer is the server API for RobotCtl service.
type RobotExchangeInfo ¶
type RobotExchangeInfo struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` AccessKey string `protobuf:"bytes,3,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` SecretKey string `protobuf:"bytes,4,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotExchangeInfo) Descriptor ¶
func (*RobotExchangeInfo) Descriptor() ([]byte, []int)
func (*RobotExchangeInfo) GetAccessKey ¶
func (m *RobotExchangeInfo) GetAccessKey() string
func (*RobotExchangeInfo) GetLabel ¶
func (m *RobotExchangeInfo) GetLabel() string
func (*RobotExchangeInfo) GetName ¶
func (m *RobotExchangeInfo) GetName() string
func (*RobotExchangeInfo) GetSecretKey ¶
func (m *RobotExchangeInfo) GetSecretKey() string
func (*RobotExchangeInfo) ProtoMessage ¶
func (*RobotExchangeInfo) ProtoMessage()
func (*RobotExchangeInfo) Reset ¶
func (m *RobotExchangeInfo) Reset()
func (*RobotExchangeInfo) String ¶
func (m *RobotExchangeInfo) String() string
func (*RobotExchangeInfo) XXX_DiscardUnknown ¶
func (m *RobotExchangeInfo) XXX_DiscardUnknown()
func (*RobotExchangeInfo) XXX_Marshal ¶
func (m *RobotExchangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotExchangeInfo) XXX_Merge ¶
func (m *RobotExchangeInfo) XXX_Merge(src proto.Message)
func (*RobotExchangeInfo) XXX_Size ¶
func (m *RobotExchangeInfo) XXX_Size() int
func (*RobotExchangeInfo) XXX_Unmarshal ¶
func (m *RobotExchangeInfo) XXX_Unmarshal(b []byte) error
type RobotExchangeInfoReply ¶
type RobotExchangeInfoReply struct { Exchanges []*RobotExchangeInfo `protobuf:"bytes,1,rep,name=exchanges,proto3" json:"exchanges,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotExchangeInfoReply) Descriptor ¶
func (*RobotExchangeInfoReply) Descriptor() ([]byte, []int)
func (*RobotExchangeInfoReply) GetExchanges ¶
func (m *RobotExchangeInfoReply) GetExchanges() []*RobotExchangeInfo
func (*RobotExchangeInfoReply) ProtoMessage ¶
func (*RobotExchangeInfoReply) ProtoMessage()
func (*RobotExchangeInfoReply) Reset ¶
func (m *RobotExchangeInfoReply) Reset()
func (*RobotExchangeInfoReply) String ¶
func (m *RobotExchangeInfoReply) String() string
func (*RobotExchangeInfoReply) XXX_DiscardUnknown ¶
func (m *RobotExchangeInfoReply) XXX_DiscardUnknown()
func (*RobotExchangeInfoReply) XXX_Marshal ¶
func (m *RobotExchangeInfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotExchangeInfoReply) XXX_Merge ¶
func (m *RobotExchangeInfoReply) XXX_Merge(src proto.Message)
func (*RobotExchangeInfoReply) XXX_Size ¶
func (m *RobotExchangeInfoReply) XXX_Size() int
func (*RobotExchangeInfoReply) XXX_Unmarshal ¶
func (m *RobotExchangeInfoReply) XXX_Unmarshal(b []byte) error
type RobotExchangeInfoRequest ¶
type RobotExchangeInfoRequest struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` RobotId string `protobuf:"bytes,2,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotExchangeInfoRequest) Descriptor ¶
func (*RobotExchangeInfoRequest) Descriptor() ([]byte, []int)
func (*RobotExchangeInfoRequest) GetRobotId ¶
func (m *RobotExchangeInfoRequest) GetRobotId() string
func (*RobotExchangeInfoRequest) GetUid ¶
func (m *RobotExchangeInfoRequest) GetUid() string
func (*RobotExchangeInfoRequest) ProtoMessage ¶
func (*RobotExchangeInfoRequest) ProtoMessage()
func (*RobotExchangeInfoRequest) Reset ¶
func (m *RobotExchangeInfoRequest) Reset()
func (*RobotExchangeInfoRequest) String ¶
func (m *RobotExchangeInfoRequest) String() string
func (*RobotExchangeInfoRequest) XXX_DiscardUnknown ¶
func (m *RobotExchangeInfoRequest) XXX_DiscardUnknown()
func (*RobotExchangeInfoRequest) XXX_Marshal ¶
func (m *RobotExchangeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotExchangeInfoRequest) XXX_Merge ¶
func (m *RobotExchangeInfoRequest) XXX_Merge(src proto.Message)
func (*RobotExchangeInfoRequest) XXX_Size ¶
func (m *RobotExchangeInfoRequest) XXX_Size() int
func (*RobotExchangeInfoRequest) XXX_Unmarshal ¶
func (m *RobotExchangeInfoRequest) XXX_Unmarshal(b []byte) error
type RobotOption ¶
type RobotOption struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotOption) Descriptor ¶
func (*RobotOption) Descriptor() ([]byte, []int)
func (*RobotOption) GetKey ¶
func (m *RobotOption) GetKey() string
func (*RobotOption) GetValue ¶
func (m *RobotOption) GetValue() string
func (*RobotOption) ProtoMessage ¶
func (*RobotOption) ProtoMessage()
func (*RobotOption) Reset ¶
func (m *RobotOption) Reset()
func (*RobotOption) String ¶
func (m *RobotOption) String() string
func (*RobotOption) XXX_DiscardUnknown ¶
func (m *RobotOption) XXX_DiscardUnknown()
func (*RobotOption) XXX_Marshal ¶
func (m *RobotOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotOption) XXX_Merge ¶
func (m *RobotOption) XXX_Merge(src proto.Message)
func (*RobotOption) XXX_Size ¶
func (m *RobotOption) XXX_Size() int
func (*RobotOption) XXX_Unmarshal ¶
func (m *RobotOption) XXX_Unmarshal(b []byte) error
type RobotOptionsReply ¶
type RobotOptionsReply struct { Options []*RobotOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotOptionsReply) Descriptor ¶
func (*RobotOptionsReply) Descriptor() ([]byte, []int)
func (*RobotOptionsReply) GetOptions ¶
func (m *RobotOptionsReply) GetOptions() []*RobotOption
func (*RobotOptionsReply) ProtoMessage ¶
func (*RobotOptionsReply) ProtoMessage()
func (*RobotOptionsReply) Reset ¶
func (m *RobotOptionsReply) Reset()
func (*RobotOptionsReply) String ¶
func (m *RobotOptionsReply) String() string
func (*RobotOptionsReply) XXX_DiscardUnknown ¶
func (m *RobotOptionsReply) XXX_DiscardUnknown()
func (*RobotOptionsReply) XXX_Marshal ¶
func (m *RobotOptionsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotOptionsReply) XXX_Merge ¶
func (m *RobotOptionsReply) XXX_Merge(src proto.Message)
func (*RobotOptionsReply) XXX_Size ¶
func (m *RobotOptionsReply) XXX_Size() int
func (*RobotOptionsReply) XXX_Unmarshal ¶
func (m *RobotOptionsReply) XXX_Unmarshal(b []byte) error
type RobotOptionsRequest ¶
type RobotOptionsRequest struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` RobotId string `protobuf:"bytes,2,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RobotOptionsRequest) Descriptor ¶
func (*RobotOptionsRequest) Descriptor() ([]byte, []int)
func (*RobotOptionsRequest) GetRobotId ¶
func (m *RobotOptionsRequest) GetRobotId() string
func (*RobotOptionsRequest) GetUid ¶
func (m *RobotOptionsRequest) GetUid() string
func (*RobotOptionsRequest) ProtoMessage ¶
func (*RobotOptionsRequest) ProtoMessage()
func (*RobotOptionsRequest) Reset ¶
func (m *RobotOptionsRequest) Reset()
func (*RobotOptionsRequest) String ¶
func (m *RobotOptionsRequest) String() string
func (*RobotOptionsRequest) XXX_DiscardUnknown ¶
func (m *RobotOptionsRequest) XXX_DiscardUnknown()
func (*RobotOptionsRequest) XXX_Marshal ¶
func (m *RobotOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RobotOptionsRequest) XXX_Merge ¶
func (m *RobotOptionsRequest) XXX_Merge(src proto.Message)
func (*RobotOptionsRequest) XXX_Size ¶
func (m *RobotOptionsRequest) XXX_Size() int
func (*RobotOptionsRequest) XXX_Unmarshal ¶
func (m *RobotOptionsRequest) XXX_Unmarshal(b []byte) error
type RobotStatus ¶
type RobotStatus int8
RobotStatus 机器人状态
const ( // RobotStatusDisabled 禁用 RobotStatusDisabled RobotStatus = iota // RobotStatusStopped 停止 RobotStatusStopped // RobotStatusStarting 启动中 RobotStatusStarting // RobotStatusRunning 运行中 RobotStatusRunning // RobotStatusRequested RobotStatusStopping 停止中 RobotStatusRequested // RobotStatusError 出错 RobotStatusError )
type SetValueReply ¶
type SetValueReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetValueReply) Descriptor ¶
func (*SetValueReply) Descriptor() ([]byte, []int)
func (*SetValueReply) GetMessage ¶
func (m *SetValueReply) GetMessage() string
func (*SetValueReply) GetSuccess ¶
func (m *SetValueReply) GetSuccess() bool
func (*SetValueReply) ProtoMessage ¶
func (*SetValueReply) ProtoMessage()
func (*SetValueReply) Reset ¶
func (m *SetValueReply) Reset()
func (*SetValueReply) String ¶
func (m *SetValueReply) String() string
func (*SetValueReply) XXX_DiscardUnknown ¶
func (m *SetValueReply) XXX_DiscardUnknown()
func (*SetValueReply) XXX_Marshal ¶
func (m *SetValueReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetValueReply) XXX_Merge ¶
func (m *SetValueReply) XXX_Merge(src proto.Message)
func (*SetValueReply) XXX_Size ¶
func (m *SetValueReply) XXX_Size() int
func (*SetValueReply) XXX_Unmarshal ¶
func (m *SetValueReply) XXX_Unmarshal(b []byte) error
type SetValueRequest ¶
type SetValueRequest struct { RobotId string `protobuf:"bytes,1,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetValueRequest) Descriptor ¶
func (*SetValueRequest) Descriptor() ([]byte, []int)
func (*SetValueRequest) GetKey ¶
func (m *SetValueRequest) GetKey() string
func (*SetValueRequest) GetRobotId ¶
func (m *SetValueRequest) GetRobotId() string
func (*SetValueRequest) GetValue ¶
func (m *SetValueRequest) GetValue() []byte
func (*SetValueRequest) ProtoMessage ¶
func (*SetValueRequest) ProtoMessage()
func (*SetValueRequest) Reset ¶
func (m *SetValueRequest) Reset()
func (*SetValueRequest) String ¶
func (m *SetValueRequest) String() string
func (*SetValueRequest) XXX_DiscardUnknown ¶
func (m *SetValueRequest) XXX_DiscardUnknown()
func (*SetValueRequest) XXX_Marshal ¶
func (m *SetValueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetValueRequest) XXX_Merge ¶
func (m *SetValueRequest) XXX_Merge(src proto.Message)
func (*SetValueRequest) XXX_Size ¶
func (m *SetValueRequest) XXX_Size() int
func (*SetValueRequest) XXX_Unmarshal ¶
func (m *SetValueRequest) XXX_Unmarshal(b []byte) error
type StatReply ¶
type StatReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatReply) Descriptor ¶
func (*StatReply) GetMessage ¶
func (*StatReply) GetSuccess ¶
func (*StatReply) ProtoMessage ¶
func (*StatReply) ProtoMessage()
func (*StatReply) XXX_DiscardUnknown ¶
func (m *StatReply) XXX_DiscardUnknown()
func (*StatReply) XXX_Marshal ¶
func (*StatReply) XXX_Unmarshal ¶
type StatRequest ¶
type StatRequest struct { RobotId string `protobuf:"bytes,1,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatRequest) Descriptor ¶
func (*StatRequest) Descriptor() ([]byte, []int)
func (*StatRequest) GetName ¶
func (m *StatRequest) GetName() string
func (*StatRequest) GetRobotId ¶
func (m *StatRequest) GetRobotId() string
func (*StatRequest) GetValue ¶
func (m *StatRequest) GetValue() []byte
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) Reset ¶
func (m *StatRequest) Reset()
func (*StatRequest) String ¶
func (m *StatRequest) String() string
func (*StatRequest) XXX_DiscardUnknown ¶
func (m *StatRequest) XXX_DiscardUnknown()
func (*StatRequest) XXX_Marshal ¶
func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatRequest) XXX_Merge ¶
func (m *StatRequest) XXX_Merge(src proto.Message)
func (*StatRequest) XXX_Size ¶
func (m *StatRequest) XXX_Size() int
func (*StatRequest) XXX_Unmarshal ¶
func (m *StatRequest) XXX_Unmarshal(b []byte) error
type Strategy ¶
type Strategy interface { StrategyCtl SetSelf(self Strategy) Setup(params []ExchangeParams) error Init() error Run() error }
Strategy 策略接口
type StrategyCtl ¶
type StrategyCtl interface { GetState() RobotStatus GetOptions() (optionMap map[string]*OptionInfo) SetOptions(options map[string]interface{}) plugin.BasicError QueueCommand(command string) plugin.BasicError Start() plugin.BasicError Stop() plugin.BasicError Pause() plugin.BasicError }
StrategyCtl 插件接口
type StrategyPlugin ¶
type StrategyPlugin struct { // Impl Injection Impl StrategyCtl }
This is the implementation of plugin.Plugin so we can serve/consume this
This has two methods: Server must return an RPC server for this plugin type. We construct a GreeterRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return GreeterRPC for this.
Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.
func (StrategyPlugin) Client ¶
func (StrategyPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
Client client
func (*StrategyPlugin) Server ¶
func (p *StrategyPlugin) Server(*plugin.MuxBroker) (interface{}, error)
Server server
type StrategyRPC ¶
type StrategyRPC struct {
// contains filtered or unexported fields
}
StrategyRPC Here is an implementation that talks over RPC
func (*StrategyRPC) GetOptions ¶
func (g *StrategyRPC) GetOptions() (optionMap map[string]*OptionInfo)
GetOptions ...
func (*StrategyRPC) QueueCommand ¶
func (g *StrategyRPC) QueueCommand(command string) plugin.BasicError
QueueCommand ...
func (*StrategyRPC) SetOptions ¶
func (g *StrategyRPC) SetOptions(options map[string]interface{}) plugin.BasicError
SetOptions ...
type StrategyRPCServer ¶
type StrategyRPCServer struct { // This is the real implementation Impl StrategyCtl }
StrategyRPCServer Here is the RPC server that GreeterRPC talks to, conforming to the requirements of net/rpc
func (*StrategyRPCServer) GetOptions ¶
func (s *StrategyRPCServer) GetOptions(args interface{}, resp *map[string]*OptionInfo) error
func (*StrategyRPCServer) GetState ¶
func (s *StrategyRPCServer) GetState(args interface{}, resp *RobotStatus) error
func (*StrategyRPCServer) Pause ¶
func (s *StrategyRPCServer) Pause(args interface{}, resp *plugin.BasicError) error
func (*StrategyRPCServer) QueueCommand ¶
func (s *StrategyRPCServer) QueueCommand(args string, resp *plugin.BasicError) error
func (*StrategyRPCServer) SetOptions ¶
func (s *StrategyRPCServer) SetOptions(args map[string]interface{}, resp *plugin.BasicError) error
func (*StrategyRPCServer) Start ¶
func (s *StrategyRPCServer) Start(args interface{}, resp *plugin.BasicError) error
func (*StrategyRPCServer) Stop ¶
func (s *StrategyRPCServer) Stop(args interface{}, resp *plugin.BasicError) error
type UpdateStatusReply ¶
type UpdateStatusReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UpdateStatusReply) Descriptor ¶
func (*UpdateStatusReply) Descriptor() ([]byte, []int)
func (*UpdateStatusReply) GetMessage ¶
func (m *UpdateStatusReply) GetMessage() string
func (*UpdateStatusReply) GetSuccess ¶
func (m *UpdateStatusReply) GetSuccess() bool
func (*UpdateStatusReply) ProtoMessage ¶
func (*UpdateStatusReply) ProtoMessage()
func (*UpdateStatusReply) Reset ¶
func (m *UpdateStatusReply) Reset()
func (*UpdateStatusReply) String ¶
func (m *UpdateStatusReply) String() string
func (*UpdateStatusReply) XXX_DiscardUnknown ¶
func (m *UpdateStatusReply) XXX_DiscardUnknown()
func (*UpdateStatusReply) XXX_Marshal ¶
func (m *UpdateStatusReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateStatusReply) XXX_Merge ¶
func (m *UpdateStatusReply) XXX_Merge(src proto.Message)
func (*UpdateStatusReply) XXX_Size ¶
func (m *UpdateStatusReply) XXX_Size() int
func (*UpdateStatusReply) XXX_Unmarshal ¶
func (m *UpdateStatusReply) XXX_Unmarshal(b []byte) error
type UpdateStatusRequest ¶
type UpdateStatusRequest struct { RobotId string `protobuf:"bytes,1,opt,name=robot_id,json=robotId,proto3" json:"robot_id,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UpdateStatusRequest) Descriptor ¶
func (*UpdateStatusRequest) Descriptor() ([]byte, []int)
func (*UpdateStatusRequest) GetRobotId ¶
func (m *UpdateStatusRequest) GetRobotId() string
func (*UpdateStatusRequest) GetStatus ¶
func (m *UpdateStatusRequest) GetStatus() int32
func (*UpdateStatusRequest) ProtoMessage ¶
func (*UpdateStatusRequest) ProtoMessage()
func (*UpdateStatusRequest) Reset ¶
func (m *UpdateStatusRequest) Reset()
func (*UpdateStatusRequest) String ¶
func (m *UpdateStatusRequest) String() string
func (*UpdateStatusRequest) XXX_DiscardUnknown ¶
func (m *UpdateStatusRequest) XXX_DiscardUnknown()
func (*UpdateStatusRequest) XXX_Marshal ¶
func (m *UpdateStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateStatusRequest) XXX_Merge ¶
func (m *UpdateStatusRequest) XXX_Merge(src proto.Message)
func (*UpdateStatusRequest) XXX_Size ¶
func (m *UpdateStatusRequest) XXX_Size() int
func (*UpdateStatusRequest) XXX_Unmarshal ¶
func (m *UpdateStatusRequest) XXX_Unmarshal(b []byte) error
type Value ¶
type Value struct { Kind ValueKind Value interface{} }