Documentation ¶
Index ¶
- Constants
- Variables
- func ClearCheckBit(strY string) error
- func GetCurrentTime() string
- func GetMaxSpiders() int
- func GetTableHandler() (*sheets.Service, error)
- func RegisterChildStatusServer(s *grpc.Server, srv ChildStatusServer)
- func RegisterRunCommandServer(s *grpc.Server, srv RunCommandServer)
- func ResetTimer()
- func RunCommand(cmd string, serverID string) string
- func SetCheckBit(strY string) error
- func StartTimer()
- func WriteCommandResult(commandResultInfo *CommandResultInfo) error
- func WriteStatusInfo(statusInfo *StatusInfo) error
- type ChildStatusClient
- type ChildStatusServer
- type Command
- func (*Command) Descriptor() ([]byte, []int)
- func (m *Command) GetCMD() string
- func (m *Command) GetCMDID() string
- func (m *Command) GetCMDTYPE() string
- func (m *Command) GetReserved() string
- func (m *Command) GetTime() string
- func (m *Command) Marshal() (dAtA []byte, err error)
- func (m *Command) MarshalTo(dAtA []byte) (int, error)
- func (m *Command) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Command) ProtoMessage()
- func (m *Command) Reset()
- func (m *Command) Size() (n int)
- func (m *Command) String() string
- func (m *Command) Unmarshal(dAtA []byte) error
- func (m *Command) XXX_DiscardUnknown()
- func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Command) XXX_Merge(src proto.Message)
- func (m *Command) XXX_Size() int
- func (m *Command) XXX_Unmarshal(b []byte) error
- type CommandResult
- func (*CommandResult) Descriptor() ([]byte, []int)
- func (m *CommandResult) GetCMD() string
- func (m *CommandResult) GetReserved() string
- func (m *CommandResult) GetResult() string
- func (m *CommandResult) GetServerID() string
- func (m *CommandResult) GetTime() string
- func (m *CommandResult) Marshal() (dAtA []byte, err error)
- func (m *CommandResult) MarshalTo(dAtA []byte) (int, error)
- func (m *CommandResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CommandResult) ProtoMessage()
- func (m *CommandResult) Reset()
- func (m *CommandResult) Size() (n int)
- func (m *CommandResult) String() string
- func (m *CommandResult) Unmarshal(dAtA []byte) error
- func (m *CommandResult) XXX_DiscardUnknown()
- func (m *CommandResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CommandResult) XXX_Merge(src proto.Message)
- func (m *CommandResult) XXX_Size() int
- func (m *CommandResult) XXX_Unmarshal(b []byte) error
- type CommandResultInfo
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (m *Empty) Marshal() (dAtA []byte, err error)
- func (m *Empty) MarshalTo(dAtA []byte) (int, error)
- func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) Size() (n int)
- func (m *Empty) String() string
- func (m *Empty) Unmarshal(dAtA []byte) error
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type RunCommandClient
- type RunCommandServer
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetReserved() string
- func (m *Status) GetServerID() string
- func (m *Status) GetStatus() string
- func (m *Status) GetTime() string
- func (m *Status) Marshal() (dAtA []byte, err error)
- func (m *Status) MarshalTo(dAtA []byte) (int, error)
- func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) Size() (n int)
- func (m *Status) String() string
- func (m *Status) Unmarshal(dAtA []byte) error
- func (m *Status) XXX_DiscardUnknown()
- func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Status) XXX_Merge(src proto.Message)
- func (m *Status) XXX_Size() int
- func (m *Status) XXX_Unmarshal(b []byte) error
- type StatusInfo
- type UnimplementedChildStatusServer
- type UnimplementedRunCommandServer
Constants ¶
const ( MOMKAT string = "MOMKAT" ALL string = "ALL" )
Definitions of Command Type
const ( /////////////////////////// StatusZone Table MaxSpiders = "20" TransCount = "3" TimerTime = 10 // seconds (HeartBeat) ChildKatCallTimeout = 3000 // milliseconds //// metadata base position of Table // Status Table StatusSheetName = "StatusZone" // X StatusRowLockX = "b" StatusSpiderIDX = "c" StatusStatusX = "d" StatusTimeX = "e" StatusCountX = "f" // Y StatusTableY = "5" /////////////////////////// CommandZone Table //// metadata base position of Table // Command Queue Table MaxCommands = "10" // Command Table CommandSheetName = "CommandZone" // X CommandIDX = "b" CommandTypeX = "c" CommandCMDX = "d" CommandSpiderIDX = "g" CommandResultNow = "h" CommandResultBefore = "i" CommandResultBeforeBefore = "j" CommandResultTimeX = "k" // Y CommandTableY = "5" )
Variables ¶
var ( ErrInvalidLengthMeerkat = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMeerkat = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMeerkat = fmt.Errorf("proto: unexpected end of group") )
var ResetFlag bool
Functions ¶
func ClearCheckBit ¶
func GetCurrentTime ¶
func GetCurrentTime() string
func GetMaxSpiders ¶
func GetMaxSpiders() int
func GetTableHandler ¶
func GetTableHandler() (*sheets.Service, error)
func RegisterChildStatusServer ¶
func RegisterChildStatusServer(s *grpc.Server, srv ChildStatusServer)
func RegisterRunCommandServer ¶
func RegisterRunCommandServer(s *grpc.Server, srv RunCommandServer)
func RunCommand ¶
func SetCheckBit ¶
func WriteCommandResult ¶
func WriteCommandResult(commandResultInfo *CommandResultInfo) error
func WriteStatusInfo ¶
func WriteStatusInfo(statusInfo *StatusInfo) error
Types ¶
type ChildStatusClient ¶
type ChildStatusClient interface { // Sends a request of Resource status GetChildStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) }
ChildStatusClient is the client API for ChildStatus service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChildStatusClient ¶
func NewChildStatusClient(cc *grpc.ClientConn) ChildStatusClient
type ChildStatusServer ¶
type ChildStatusServer interface { // Sends a request of Resource status GetChildStatus(context.Context, *Empty) (*Status, error) }
ChildStatusServer is the server API for ChildStatus service.
type Command ¶
type Command struct { CMDID string `protobuf:"bytes,1,opt,name=CMDID,proto3" json:"CMDID,omitempty"` CMDTYPE string `protobuf:"bytes,2,opt,name=CMDTYPE,proto3" json:"CMDTYPE,omitempty"` CMD string `protobuf:"bytes,3,opt,name=CMD,proto3" json:"CMD,omitempty"` Time string `protobuf:"bytes,4,opt,name=Time,proto3" json:"Time,omitempty"` Reserved string `protobuf:"bytes,5,opt,name=Reserved,proto3" json:"Reserved,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The input message containing for a ChildKat to run
func (*Command) Descriptor ¶
func (*Command) GetCMDTYPE ¶
func (*Command) GetReserved ¶
func (*Command) MarshalToSizedBuffer ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) XXX_DiscardUnknown ¶
func (m *Command) XXX_DiscardUnknown()
func (*Command) XXX_Marshal ¶
func (*Command) XXX_Unmarshal ¶
type CommandResult ¶
type CommandResult struct { ServerID string `protobuf:"bytes,1,opt,name=ServerID,proto3" json:"ServerID,omitempty"` CMD string `protobuf:"bytes,2,opt,name=CMD,proto3" json:"CMD,omitempty"` Result string `protobuf:"bytes,3,opt,name=Result,proto3" json:"Result,omitempty"` Time string `protobuf:"bytes,4,opt,name=Time,proto3" json:"Time,omitempty"` Reserved string `protobuf:"bytes,5,opt,name=Reserved,proto3" json:"Reserved,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing a ChildKat Command Result
func (*CommandResult) Descriptor ¶
func (*CommandResult) Descriptor() ([]byte, []int)
func (*CommandResult) GetCMD ¶
func (m *CommandResult) GetCMD() string
func (*CommandResult) GetReserved ¶
func (m *CommandResult) GetReserved() string
func (*CommandResult) GetResult ¶
func (m *CommandResult) GetResult() string
func (*CommandResult) GetServerID ¶
func (m *CommandResult) GetServerID() string
func (*CommandResult) GetTime ¶
func (m *CommandResult) GetTime() string
func (*CommandResult) Marshal ¶
func (m *CommandResult) Marshal() (dAtA []byte, err error)
func (*CommandResult) MarshalToSizedBuffer ¶
func (m *CommandResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CommandResult) ProtoMessage ¶
func (*CommandResult) ProtoMessage()
func (*CommandResult) Reset ¶
func (m *CommandResult) Reset()
func (*CommandResult) Size ¶
func (m *CommandResult) Size() (n int)
func (*CommandResult) String ¶
func (m *CommandResult) String() string
func (*CommandResult) Unmarshal ¶
func (m *CommandResult) Unmarshal(dAtA []byte) error
func (*CommandResult) XXX_DiscardUnknown ¶
func (m *CommandResult) XXX_DiscardUnknown()
func (*CommandResult) XXX_Marshal ¶
func (m *CommandResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommandResult) XXX_Merge ¶
func (m *CommandResult) XXX_Merge(src proto.Message)
func (*CommandResult) XXX_Size ¶
func (m *CommandResult) XXX_Size() int
func (*CommandResult) XXX_Unmarshal ¶
func (m *CommandResult) XXX_Unmarshal(b []byte) error
type CommandResultInfo ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message with empty
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type RunCommandClient ¶
type RunCommandClient interface {
RunCommand(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResult, error)
}
RunCommandClient is the client API for RunCommand service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRunCommandClient ¶
func NewRunCommandClient(cc *grpc.ClientConn) RunCommandClient
type RunCommandServer ¶
type RunCommandServer interface {
RunCommand(context.Context, *Command) (*CommandResult, error)
}
RunCommandServer is the server API for RunCommand service.
type Status ¶
type Status struct { ServerID string `protobuf:"bytes,1,opt,name=ServerID,proto3" json:"ServerID,omitempty"` Status string `protobuf:"bytes,2,opt,name=Status,proto3" json:"Status,omitempty"` Time string `protobuf:"bytes,3,opt,name=Time,proto3" json:"Time,omitempty"` Reserved string `protobuf:"bytes,4,opt,name=Reserved,proto3" json:"Reserved,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing a ChildKat status
func (*Status) Descriptor ¶
func (*Status) GetReserved ¶
func (*Status) GetServerID ¶
func (*Status) MarshalToSizedBuffer ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) XXX_DiscardUnknown ¶
func (m *Status) XXX_DiscardUnknown()
func (*Status) XXX_Marshal ¶
func (*Status) XXX_Unmarshal ¶
type StatusInfo ¶
type UnimplementedChildStatusServer ¶
type UnimplementedChildStatusServer struct { }
UnimplementedChildStatusServer can be embedded to have forward compatible implementations.
func (*UnimplementedChildStatusServer) GetChildStatus ¶
type UnimplementedRunCommandServer ¶
type UnimplementedRunCommandServer struct { }
UnimplementedRunCommandServer can be embedded to have forward compatible implementations.
func (*UnimplementedRunCommandServer) RunCommand ¶
func (*UnimplementedRunCommandServer) RunCommand(ctx context.Context, req *Command) (*CommandResult, error)