protocol

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BKDistDir     = ".bk_dist"
	BKDistLockDir = "lock"

	Bkdistcmdversion = "1.0.0.0"
	Bkdistcmdmagic   = "b&*(%$#@*(@k"

	BKStatKeyReceivedTime = "recieved_time"
	BKStatKeyStartTime    = "start_time"
	BKStatKeyEndTime      = "end_time"
	BKStatKeySendTime     = "send_time"

	TOKENLEN      = 4
	TOKENBUFLEN   = 12
	TOEKNHEADFLAG = "HEAD"
)

const vars

View Source
const (
	UnknownMessage = "unknown"
)

define const vars

Variables

View Source
var PBCacheStatus_name = map[int32]string{
	0: "NOFOUND",
	1: "SUCCESS",
	2: "ERRORWHILEFINDING",
	3: "ERRORWHILESAVING",
}
View Source
var PBCacheStatus_value = map[string]int32{
	"NOFOUND":           0,
	"SUCCESS":           1,
	"ERRORWHILEFINDING": 2,
	"ERRORWHILESAVING":  3,
}
View Source
var PBCmdType_name = map[int32]string{
	0:    "DISPATCHTASKREQ",
	1:    "DISPATCHTASKRSP",
	2:    "SYNCTIMEREQ",
	3:    "SYNCTIMERSP",
	4:    "SENDFILEREQ",
	5:    "SENDFILERSP",
	6:    "CHECKCACHEREQ",
	7:    "CHECKCACHERSP",
	20:   "QUERYSLOTREQ",
	21:   "QUERYSLOTRSP",
	22:   "SLOTRSPACK",
	100:  "LONGTCPHANDSHAKEREQ",
	9999: "UNKNOWN",
}
View Source
var PBCmdType_value = map[string]int32{
	"DISPATCHTASKREQ":     0,
	"DISPATCHTASKRSP":     1,
	"SYNCTIMEREQ":         2,
	"SYNCTIMERSP":         3,
	"SENDFILEREQ":         4,
	"SENDFILERSP":         5,
	"CHECKCACHEREQ":       6,
	"CHECKCACHERSP":       7,
	"QUERYSLOTREQ":        20,
	"QUERYSLOTRSP":        21,
	"SLOTRSPACK":          22,
	"LONGTCPHANDSHAKEREQ": 100,
	"UNKNOWN":             9999,
}
View Source
var PBCompressType_name = map[int32]string{
	0: "NONE",
	1: "LZO",
	2: "LZ4",
}
View Source
var PBCompressType_value = map[string]int32{
	"NONE": 0,
	"LZO":  1,
	"LZ4":  2,
}

Functions

This section is empty.

Types

type CompressType

type CompressType int32

CompressType define compress types

const (
	CompressNone CompressType = iota
	CompressLZO
	CompressLZ4
	CompressUnknown = 99
)

define compress types

func (CompressType) String

func (r CompressType) String() string

String return the string of CompressType

type GetHostReq

type GetHostReq struct {
	TaskID  string `json:"task_id"`
	SlotNum int32  `json:"slot_num"`
}

GetHostReq json struct to get host

type GetHostRsp

type GetHostRsp struct {
	Retcode int32      `json:"retcode"`
	Message string     `json:"message"`
	TaskID  string     `json:"task_id"`
	Slots   []HostSlot `json:"host_slots"`
}

GetHostRsp response data for get host slot

type Host

type Host struct {
	Server       string       `json:"server"`
	TokenString  string       `json:"token_string"`
	Hosttype     HostType     `json:"host_type"`
	Jobs         int          `json:"jobs"`
	Compresstype CompressType `json:"compress_type"`
	Protocol     string       `json:"protocol"`
	TimeDelta    int64        `json:"time_delta"`
}

Host define remote host

func ObtainCCHosts

func ObtainCCHosts(hoststr string) ([]Host, error)

ObtainCCHosts resolve cc host

func (*Host) Equal

func (h *Host) Equal(other *Host) bool

Equal to judge whether equal

func (*Host) String

func (h *Host) String() string

String return the string of host info, generated

type HostSlot

type HostSlot struct {
	Host         Host  `json:"host"`
	SlotSequence int32 `json:"slot_sequence"`
}

HostSlot to desc slot of host

type HostType

type HostType string

HostType indicate host is remote or local

const (
	HostRemote HostType = "remote"
	HostLocal  HostType = "local"

	LocalHostToken = "localhost"
)

const vars

func (HostType) String

func (h HostType) String() string

STring return the string of HostType

type Message

type Message struct {
	Messagetype MessageType
	// for message string, it's message content, or it's file path for message file
	Data []byte
	// to compress file content if need
	Compresstype CompressType
}

Message define message to send

type MessageType

type MessageType int32

MessageType define message type

const (
	MessageString MessageType = iota
	MessageFile
)

define message types

func (MessageType) String

func (r MessageType) String() string

String return the string of MessageType

type PBBodyCheckCacheReq

type PBBodyCheckCacheReq struct {
	Params               []*PBCacheParam `protobuf:"bytes,1,rep,name=params" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*PBBodyCheckCacheReq) Descriptor

func (*PBBodyCheckCacheReq) Descriptor() ([]byte, []int)

func (*PBBodyCheckCacheReq) GetParams

func (m *PBBodyCheckCacheReq) GetParams() []*PBCacheParam

func (*PBBodyCheckCacheReq) ProtoMessage

func (*PBBodyCheckCacheReq) ProtoMessage()

func (*PBBodyCheckCacheReq) Reset

func (m *PBBodyCheckCacheReq) Reset()

func (*PBBodyCheckCacheReq) String

func (m *PBBodyCheckCacheReq) String() string

func (*PBBodyCheckCacheReq) XXX_DiscardUnknown

func (m *PBBodyCheckCacheReq) XXX_DiscardUnknown()

func (*PBBodyCheckCacheReq) XXX_Marshal

func (m *PBBodyCheckCacheReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyCheckCacheReq) XXX_Merge

func (dst *PBBodyCheckCacheReq) XXX_Merge(src proto.Message)

func (*PBBodyCheckCacheReq) XXX_Size

func (m *PBBodyCheckCacheReq) XXX_Size() int

func (*PBBodyCheckCacheReq) XXX_Unmarshal

func (m *PBBodyCheckCacheReq) XXX_Unmarshal(b []byte) error

type PBBodyCheckCacheRsp

type PBBodyCheckCacheRsp struct {
	Results              []*PBCacheResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*PBBodyCheckCacheRsp) Descriptor

func (*PBBodyCheckCacheRsp) Descriptor() ([]byte, []int)

func (*PBBodyCheckCacheRsp) GetResults

func (m *PBBodyCheckCacheRsp) GetResults() []*PBCacheResult

func (*PBBodyCheckCacheRsp) ProtoMessage

func (*PBBodyCheckCacheRsp) ProtoMessage()

func (*PBBodyCheckCacheRsp) Reset

func (m *PBBodyCheckCacheRsp) Reset()

func (*PBBodyCheckCacheRsp) String

func (m *PBBodyCheckCacheRsp) String() string

func (*PBBodyCheckCacheRsp) XXX_DiscardUnknown

func (m *PBBodyCheckCacheRsp) XXX_DiscardUnknown()

func (*PBBodyCheckCacheRsp) XXX_Marshal

func (m *PBBodyCheckCacheRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyCheckCacheRsp) XXX_Merge

func (dst *PBBodyCheckCacheRsp) XXX_Merge(src proto.Message)

func (*PBBodyCheckCacheRsp) XXX_Size

func (m *PBBodyCheckCacheRsp) XXX_Size() int

func (*PBBodyCheckCacheRsp) XXX_Unmarshal

func (m *PBBodyCheckCacheRsp) XXX_Unmarshal(b []byte) error

type PBBodyDispatchTaskReq

type PBBodyDispatchTaskReq struct {
	Cmds                 []*PBCommand `protobuf:"bytes,1,rep,name=cmds" json:"cmds,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*PBBodyDispatchTaskReq) Descriptor

func (*PBBodyDispatchTaskReq) Descriptor() ([]byte, []int)

func (*PBBodyDispatchTaskReq) GetCmds

func (m *PBBodyDispatchTaskReq) GetCmds() []*PBCommand

func (*PBBodyDispatchTaskReq) ProtoMessage

func (*PBBodyDispatchTaskReq) ProtoMessage()

func (*PBBodyDispatchTaskReq) Reset

func (m *PBBodyDispatchTaskReq) Reset()

func (*PBBodyDispatchTaskReq) String

func (m *PBBodyDispatchTaskReq) String() string

func (*PBBodyDispatchTaskReq) XXX_DiscardUnknown

func (m *PBBodyDispatchTaskReq) XXX_DiscardUnknown()

func (*PBBodyDispatchTaskReq) XXX_Marshal

func (m *PBBodyDispatchTaskReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyDispatchTaskReq) XXX_Merge

func (dst *PBBodyDispatchTaskReq) XXX_Merge(src proto.Message)

func (*PBBodyDispatchTaskReq) XXX_Size

func (m *PBBodyDispatchTaskReq) XXX_Size() int

func (*PBBodyDispatchTaskReq) XXX_Unmarshal

func (m *PBBodyDispatchTaskReq) XXX_Unmarshal(b []byte) error

type PBBodyDispatchTaskRsp

type PBBodyDispatchTaskRsp struct {
	Results              []*PBResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*PBBodyDispatchTaskRsp) Descriptor

func (*PBBodyDispatchTaskRsp) Descriptor() ([]byte, []int)

func (*PBBodyDispatchTaskRsp) GetResults

func (m *PBBodyDispatchTaskRsp) GetResults() []*PBResult

func (*PBBodyDispatchTaskRsp) ProtoMessage

func (*PBBodyDispatchTaskRsp) ProtoMessage()

func (*PBBodyDispatchTaskRsp) Reset

func (m *PBBodyDispatchTaskRsp) Reset()

func (*PBBodyDispatchTaskRsp) String

func (m *PBBodyDispatchTaskRsp) String() string

func (*PBBodyDispatchTaskRsp) XXX_DiscardUnknown

func (m *PBBodyDispatchTaskRsp) XXX_DiscardUnknown()

func (*PBBodyDispatchTaskRsp) XXX_Marshal

func (m *PBBodyDispatchTaskRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyDispatchTaskRsp) XXX_Merge

func (dst *PBBodyDispatchTaskRsp) XXX_Merge(src proto.Message)

func (*PBBodyDispatchTaskRsp) XXX_Size

func (m *PBBodyDispatchTaskRsp) XXX_Size() int

func (*PBBodyDispatchTaskRsp) XXX_Unmarshal

func (m *PBBodyDispatchTaskRsp) XXX_Unmarshal(b []byte) error

type PBBodyQuerySlotReq

type PBBodyQuerySlotReq struct {
	Priority             *int32   `protobuf:"varint,1,req,name=Priority" json:"Priority,omitempty"`
	Waittotaltasknum     *int32   `protobuf:"varint,2,req,name=waittotaltasknum" json:"waittotaltasknum,omitempty"`
	Tasktype             *string  `protobuf:"bytes,3,req,name=tasktype" json:"tasktype,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBBodyQuerySlotReq) Descriptor

func (*PBBodyQuerySlotReq) Descriptor() ([]byte, []int)

func (*PBBodyQuerySlotReq) GetPriority

func (m *PBBodyQuerySlotReq) GetPriority() int32

func (*PBBodyQuerySlotReq) GetTasktype

func (m *PBBodyQuerySlotReq) GetTasktype() string

func (*PBBodyQuerySlotReq) GetWaittotaltasknum

func (m *PBBodyQuerySlotReq) GetWaittotaltasknum() int32

func (*PBBodyQuerySlotReq) ProtoMessage

func (*PBBodyQuerySlotReq) ProtoMessage()

func (*PBBodyQuerySlotReq) Reset

func (m *PBBodyQuerySlotReq) Reset()

func (*PBBodyQuerySlotReq) String

func (m *PBBodyQuerySlotReq) String() string

func (*PBBodyQuerySlotReq) XXX_DiscardUnknown

func (m *PBBodyQuerySlotReq) XXX_DiscardUnknown()

func (*PBBodyQuerySlotReq) XXX_Marshal

func (m *PBBodyQuerySlotReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyQuerySlotReq) XXX_Merge

func (dst *PBBodyQuerySlotReq) XXX_Merge(src proto.Message)

func (*PBBodyQuerySlotReq) XXX_Size

func (m *PBBodyQuerySlotReq) XXX_Size() int

func (*PBBodyQuerySlotReq) XXX_Unmarshal

func (m *PBBodyQuerySlotReq) XXX_Unmarshal(b []byte) error

type PBBodyQuerySlotRsp

type PBBodyQuerySlotRsp struct {
	Availableslotnum     *int32   `protobuf:"varint,1,req,name=availableslotnum" json:"availableslotnum,omitempty"`
	Refused              *int32   `protobuf:"varint,2,req,name=refused" json:"refused,omitempty"`
	Message              *string  `protobuf:"bytes,3,req,name=message" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBBodyQuerySlotRsp) Descriptor

func (*PBBodyQuerySlotRsp) Descriptor() ([]byte, []int)

func (*PBBodyQuerySlotRsp) GetAvailableslotnum

func (m *PBBodyQuerySlotRsp) GetAvailableslotnum() int32

func (*PBBodyQuerySlotRsp) GetMessage

func (m *PBBodyQuerySlotRsp) GetMessage() string

func (*PBBodyQuerySlotRsp) GetRefused

func (m *PBBodyQuerySlotRsp) GetRefused() int32

func (*PBBodyQuerySlotRsp) ProtoMessage

func (*PBBodyQuerySlotRsp) ProtoMessage()

func (*PBBodyQuerySlotRsp) Reset

func (m *PBBodyQuerySlotRsp) Reset()

func (*PBBodyQuerySlotRsp) String

func (m *PBBodyQuerySlotRsp) String() string

func (*PBBodyQuerySlotRsp) XXX_DiscardUnknown

func (m *PBBodyQuerySlotRsp) XXX_DiscardUnknown()

func (*PBBodyQuerySlotRsp) XXX_Marshal

func (m *PBBodyQuerySlotRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodyQuerySlotRsp) XXX_Merge

func (dst *PBBodyQuerySlotRsp) XXX_Merge(src proto.Message)

func (*PBBodyQuerySlotRsp) XXX_Size

func (m *PBBodyQuerySlotRsp) XXX_Size() int

func (*PBBodyQuerySlotRsp) XXX_Unmarshal

func (m *PBBodyQuerySlotRsp) XXX_Unmarshal(b []byte) error

type PBBodySendFileReq

type PBBodySendFileReq struct {
	Inputfiles           []*PBFileDesc `protobuf:"bytes,1,rep,name=inputfiles" json:"inputfiles,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*PBBodySendFileReq) Descriptor

func (*PBBodySendFileReq) Descriptor() ([]byte, []int)

func (*PBBodySendFileReq) GetInputfiles

func (m *PBBodySendFileReq) GetInputfiles() []*PBFileDesc

func (*PBBodySendFileReq) ProtoMessage

func (*PBBodySendFileReq) ProtoMessage()

func (*PBBodySendFileReq) Reset

func (m *PBBodySendFileReq) Reset()

func (*PBBodySendFileReq) String

func (m *PBBodySendFileReq) String() string

func (*PBBodySendFileReq) XXX_DiscardUnknown

func (m *PBBodySendFileReq) XXX_DiscardUnknown()

func (*PBBodySendFileReq) XXX_Marshal

func (m *PBBodySendFileReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodySendFileReq) XXX_Merge

func (dst *PBBodySendFileReq) XXX_Merge(src proto.Message)

func (*PBBodySendFileReq) XXX_Size

func (m *PBBodySendFileReq) XXX_Size() int

func (*PBBodySendFileReq) XXX_Unmarshal

func (m *PBBodySendFileReq) XXX_Unmarshal(b []byte) error

type PBBodySendFileRsp

type PBBodySendFileRsp struct {
	Results              []*PBFileResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*PBBodySendFileRsp) Descriptor

func (*PBBodySendFileRsp) Descriptor() ([]byte, []int)

func (*PBBodySendFileRsp) GetResults

func (m *PBBodySendFileRsp) GetResults() []*PBFileResult

func (*PBBodySendFileRsp) ProtoMessage

func (*PBBodySendFileRsp) ProtoMessage()

func (*PBBodySendFileRsp) Reset

func (m *PBBodySendFileRsp) Reset()

func (*PBBodySendFileRsp) String

func (m *PBBodySendFileRsp) String() string

func (*PBBodySendFileRsp) XXX_DiscardUnknown

func (m *PBBodySendFileRsp) XXX_DiscardUnknown()

func (*PBBodySendFileRsp) XXX_Marshal

func (m *PBBodySendFileRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodySendFileRsp) XXX_Merge

func (dst *PBBodySendFileRsp) XXX_Merge(src proto.Message)

func (*PBBodySendFileRsp) XXX_Size

func (m *PBBodySendFileRsp) XXX_Size() int

func (*PBBodySendFileRsp) XXX_Unmarshal

func (m *PBBodySendFileRsp) XXX_Unmarshal(b []byte) error

type PBBodySlotRspAck

type PBBodySlotRspAck struct {
	Consumeslotnum       *int32   `protobuf:"varint,1,req,name=consumeslotnum" json:"consumeslotnum,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBBodySlotRspAck) Descriptor

func (*PBBodySlotRspAck) Descriptor() ([]byte, []int)

func (*PBBodySlotRspAck) GetConsumeslotnum

func (m *PBBodySlotRspAck) GetConsumeslotnum() int32

func (*PBBodySlotRspAck) ProtoMessage

func (*PBBodySlotRspAck) ProtoMessage()

func (*PBBodySlotRspAck) Reset

func (m *PBBodySlotRspAck) Reset()

func (*PBBodySlotRspAck) String

func (m *PBBodySlotRspAck) String() string

func (*PBBodySlotRspAck) XXX_DiscardUnknown

func (m *PBBodySlotRspAck) XXX_DiscardUnknown()

func (*PBBodySlotRspAck) XXX_Marshal

func (m *PBBodySlotRspAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodySlotRspAck) XXX_Merge

func (dst *PBBodySlotRspAck) XXX_Merge(src proto.Message)

func (*PBBodySlotRspAck) XXX_Size

func (m *PBBodySlotRspAck) XXX_Size() int

func (*PBBodySlotRspAck) XXX_Unmarshal

func (m *PBBodySlotRspAck) XXX_Unmarshal(b []byte) error

type PBBodySyncTimeRsp

type PBBodySyncTimeRsp struct {
	Timenanosecond       *int64   `protobuf:"varint,1,req,name=timenanosecond" json:"timenanosecond,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBBodySyncTimeRsp) Descriptor

func (*PBBodySyncTimeRsp) Descriptor() ([]byte, []int)

func (*PBBodySyncTimeRsp) GetTimenanosecond

func (m *PBBodySyncTimeRsp) GetTimenanosecond() int64

func (*PBBodySyncTimeRsp) ProtoMessage

func (*PBBodySyncTimeRsp) ProtoMessage()

func (*PBBodySyncTimeRsp) Reset

func (m *PBBodySyncTimeRsp) Reset()

func (*PBBodySyncTimeRsp) String

func (m *PBBodySyncTimeRsp) String() string

func (*PBBodySyncTimeRsp) XXX_DiscardUnknown

func (m *PBBodySyncTimeRsp) XXX_DiscardUnknown()

func (*PBBodySyncTimeRsp) XXX_Marshal

func (m *PBBodySyncTimeRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBBodySyncTimeRsp) XXX_Merge

func (dst *PBBodySyncTimeRsp) XXX_Merge(src proto.Message)

func (*PBBodySyncTimeRsp) XXX_Size

func (m *PBBodySyncTimeRsp) XXX_Size() int

func (*PBBodySyncTimeRsp) XXX_Unmarshal

func (m *PBBodySyncTimeRsp) XXX_Unmarshal(b []byte) error

type PBCacheParam

type PBCacheParam struct {
	Name                 []byte   `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Md5                  []byte   `protobuf:"bytes,2,req,name=md5" json:"md5,omitempty"`
	Size                 *int64   `protobuf:"varint,3,opt,name=size" json:"size,omitempty"`
	Target               []byte   `protobuf:"bytes,4,req,name=target" json:"target,omitempty"`
	Overwrite            *int32   `protobuf:"varint,5,opt,name=overwrite" json:"overwrite,omitempty"`
	Filemode             *uint32  `protobuf:"varint,6,opt,name=filemode" json:"filemode,omitempty"`
	Linktarget           []byte   `protobuf:"bytes,7,opt,name=linktarget" json:"linktarget,omitempty"`
	Modifytime           *int64   `protobuf:"varint,8,opt,name=modifytime" json:"modifytime,omitempty"`
	Accesstime           *int64   `protobuf:"varint,9,opt,name=accesstime" json:"accesstime,omitempty"`
	Createtime           *int64   `protobuf:"varint,10,opt,name=createtime" json:"createtime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBCacheParam) Descriptor

func (*PBCacheParam) Descriptor() ([]byte, []int)

func (*PBCacheParam) GetAccesstime

func (m *PBCacheParam) GetAccesstime() int64

func (*PBCacheParam) GetCreatetime

func (m *PBCacheParam) GetCreatetime() int64

func (*PBCacheParam) GetFilemode

func (m *PBCacheParam) GetFilemode() uint32

func (*PBCacheParam) GetLinktarget

func (m *PBCacheParam) GetLinktarget() []byte

func (*PBCacheParam) GetMd5

func (m *PBCacheParam) GetMd5() []byte

func (*PBCacheParam) GetModifytime

func (m *PBCacheParam) GetModifytime() int64

func (*PBCacheParam) GetName

func (m *PBCacheParam) GetName() []byte

func (*PBCacheParam) GetOverwrite

func (m *PBCacheParam) GetOverwrite() int32

func (*PBCacheParam) GetSize

func (m *PBCacheParam) GetSize() int64

func (*PBCacheParam) GetTarget

func (m *PBCacheParam) GetTarget() []byte

func (*PBCacheParam) ProtoMessage

func (*PBCacheParam) ProtoMessage()

func (*PBCacheParam) Reset

func (m *PBCacheParam) Reset()

func (*PBCacheParam) String

func (m *PBCacheParam) String() string

func (*PBCacheParam) XXX_DiscardUnknown

func (m *PBCacheParam) XXX_DiscardUnknown()

func (*PBCacheParam) XXX_Marshal

func (m *PBCacheParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBCacheParam) XXX_Merge

func (dst *PBCacheParam) XXX_Merge(src proto.Message)

func (*PBCacheParam) XXX_Size

func (m *PBCacheParam) XXX_Size() int

func (*PBCacheParam) XXX_Unmarshal

func (m *PBCacheParam) XXX_Unmarshal(b []byte) error

type PBCacheResult

type PBCacheResult struct {
	Status               *PBCacheStatus `protobuf:"varint,1,req,name=status,enum=protocol.PBCacheStatus" json:"status,omitempty"`
	Reason               []byte         `protobuf:"bytes,2,req,name=reason" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*PBCacheResult) Descriptor

func (*PBCacheResult) Descriptor() ([]byte, []int)

func (*PBCacheResult) GetReason

func (m *PBCacheResult) GetReason() []byte

func (*PBCacheResult) GetStatus

func (m *PBCacheResult) GetStatus() PBCacheStatus

func (*PBCacheResult) ProtoMessage

func (*PBCacheResult) ProtoMessage()

func (*PBCacheResult) Reset

func (m *PBCacheResult) Reset()

func (*PBCacheResult) String

func (m *PBCacheResult) String() string

func (*PBCacheResult) XXX_DiscardUnknown

func (m *PBCacheResult) XXX_DiscardUnknown()

func (*PBCacheResult) XXX_Marshal

func (m *PBCacheResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBCacheResult) XXX_Merge

func (dst *PBCacheResult) XXX_Merge(src proto.Message)

func (*PBCacheResult) XXX_Size

func (m *PBCacheResult) XXX_Size() int

func (*PBCacheResult) XXX_Unmarshal

func (m *PBCacheResult) XXX_Unmarshal(b []byte) error

type PBCacheStatus

type PBCacheStatus int32
const (
	PBCacheStatus_NOFOUND           PBCacheStatus = 0
	PBCacheStatus_SUCCESS           PBCacheStatus = 1
	PBCacheStatus_ERRORWHILEFINDING PBCacheStatus = 2
	PBCacheStatus_ERRORWHILESAVING  PBCacheStatus = 3
)

func (PBCacheStatus) Enum

func (x PBCacheStatus) Enum() *PBCacheStatus

func (PBCacheStatus) EnumDescriptor

func (PBCacheStatus) EnumDescriptor() ([]byte, []int)

func (PBCacheStatus) String

func (x PBCacheStatus) String() string

func (*PBCacheStatus) UnmarshalJSON

func (x *PBCacheStatus) UnmarshalJSON(data []byte) error

type PBCmdType

type PBCmdType int32
const (
	PBCmdType_DISPATCHTASKREQ     PBCmdType = 0
	PBCmdType_DISPATCHTASKRSP     PBCmdType = 1
	PBCmdType_SYNCTIMEREQ         PBCmdType = 2
	PBCmdType_SYNCTIMERSP         PBCmdType = 3
	PBCmdType_SENDFILEREQ         PBCmdType = 4
	PBCmdType_SENDFILERSP         PBCmdType = 5
	PBCmdType_CHECKCACHEREQ       PBCmdType = 6
	PBCmdType_CHECKCACHERSP       PBCmdType = 7
	PBCmdType_QUERYSLOTREQ        PBCmdType = 20
	PBCmdType_QUERYSLOTRSP        PBCmdType = 21
	PBCmdType_SLOTRSPACK          PBCmdType = 22
	PBCmdType_LONGTCPHANDSHAKEREQ PBCmdType = 100
	PBCmdType_UNKNOWN             PBCmdType = 9999
)

func (PBCmdType) Enum

func (x PBCmdType) Enum() *PBCmdType

func (PBCmdType) EnumDescriptor

func (PBCmdType) EnumDescriptor() ([]byte, []int)

func (PBCmdType) String

func (x PBCmdType) String() string

func (*PBCmdType) UnmarshalJSON

func (x *PBCmdType) UnmarshalJSON(data []byte) error

type PBCommand

type PBCommand struct {
	Workdir              *string       `protobuf:"bytes,1,req,name=workdir" json:"workdir,omitempty"`
	Exepath              *string       `protobuf:"bytes,2,req,name=exepath" json:"exepath,omitempty"`
	Exename              *string       `protobuf:"bytes,3,req,name=exename" json:"exename,omitempty"`
	Params               []string      `protobuf:"bytes,4,rep,name=params" json:"params,omitempty"`
	Inputfiles           []*PBFileDesc `protobuf:"bytes,5,rep,name=inputfiles" json:"inputfiles,omitempty"`
	Resultfiles          []string      `protobuf:"bytes,6,rep,name=resultfiles" json:"resultfiles,omitempty"`
	Env                  [][]byte      `protobuf:"bytes,7,rep,name=env" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*PBCommand) Descriptor

func (*PBCommand) Descriptor() ([]byte, []int)

func (*PBCommand) GetEnv

func (m *PBCommand) GetEnv() [][]byte

func (*PBCommand) GetExename

func (m *PBCommand) GetExename() string

func (*PBCommand) GetExepath

func (m *PBCommand) GetExepath() string

func (*PBCommand) GetInputfiles

func (m *PBCommand) GetInputfiles() []*PBFileDesc

func (*PBCommand) GetParams

func (m *PBCommand) GetParams() []string

func (*PBCommand) GetResultfiles

func (m *PBCommand) GetResultfiles() []string

func (*PBCommand) GetWorkdir

func (m *PBCommand) GetWorkdir() string

func (*PBCommand) ProtoMessage

func (*PBCommand) ProtoMessage()

func (*PBCommand) Reset

func (m *PBCommand) Reset()

func (*PBCommand) String

func (m *PBCommand) String() string

func (*PBCommand) XXX_DiscardUnknown

func (m *PBCommand) XXX_DiscardUnknown()

func (*PBCommand) XXX_Marshal

func (m *PBCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBCommand) XXX_Merge

func (dst *PBCommand) XXX_Merge(src proto.Message)

func (*PBCommand) XXX_Size

func (m *PBCommand) XXX_Size() int

func (*PBCommand) XXX_Unmarshal

func (m *PBCommand) XXX_Unmarshal(b []byte) error

type PBCompressType

type PBCompressType int32
const (
	PBCompressType_NONE PBCompressType = 0
	PBCompressType_LZO  PBCompressType = 1
	PBCompressType_LZ4  PBCompressType = 2
)

func (PBCompressType) Enum

func (x PBCompressType) Enum() *PBCompressType

func (PBCompressType) EnumDescriptor

func (PBCompressType) EnumDescriptor() ([]byte, []int)

func (PBCompressType) String

func (x PBCompressType) String() string

func (*PBCompressType) UnmarshalJSON

func (x *PBCompressType) UnmarshalJSON(data []byte) error

type PBFileDesc

type PBFileDesc struct {
	Fullpath       *string         `protobuf:"bytes,1,req,name=fullpath" json:"fullpath,omitempty"`
	Size           *int64          `protobuf:"varint,2,req,name=size" json:"size,omitempty"`
	Md5            *string         `protobuf:"bytes,3,req,name=md5" json:"md5,omitempty"`
	Compresstype   *PBCompressType `protobuf:"varint,4,req,name=compresstype,enum=protocol.PBCompressType" json:"compresstype,omitempty"`
	Compressedsize *int64          `protobuf:"varint,5,req,name=compressedsize" json:"compressedsize,omitempty"`
	Buffer         []byte          `protobuf:"bytes,6,opt,name=buffer" json:"buffer,omitempty"`
	// to specified relative path in target
	Targetrelativepath   *string  `protobuf:"bytes,7,opt,name=targetrelativepath" json:"targetrelativepath,omitempty"`
	Filemode             *uint32  `protobuf:"varint,8,opt,name=filemode" json:"filemode,omitempty"`
	Linktarget           []byte   `protobuf:"bytes,9,opt,name=linktarget" json:"linktarget,omitempty"`
	Modifytime           *int64   `protobuf:"varint,10,opt,name=modifytime" json:"modifytime,omitempty"`
	Accesstime           *int64   `protobuf:"varint,11,opt,name=accesstime" json:"accesstime,omitempty"`
	Createtime           *int64   `protobuf:"varint,12,opt,name=createtime" json:"createtime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBFileDesc) Descriptor

func (*PBFileDesc) Descriptor() ([]byte, []int)

func (*PBFileDesc) GetAccesstime

func (m *PBFileDesc) GetAccesstime() int64

func (*PBFileDesc) GetBuffer

func (m *PBFileDesc) GetBuffer() []byte

func (*PBFileDesc) GetCompressedsize

func (m *PBFileDesc) GetCompressedsize() int64

func (*PBFileDesc) GetCompresstype

func (m *PBFileDesc) GetCompresstype() PBCompressType

func (*PBFileDesc) GetCreatetime

func (m *PBFileDesc) GetCreatetime() int64

func (*PBFileDesc) GetFilemode

func (m *PBFileDesc) GetFilemode() uint32

func (*PBFileDesc) GetFullpath

func (m *PBFileDesc) GetFullpath() string

func (*PBFileDesc) GetLinktarget

func (m *PBFileDesc) GetLinktarget() []byte

func (*PBFileDesc) GetMd5

func (m *PBFileDesc) GetMd5() string

func (*PBFileDesc) GetModifytime

func (m *PBFileDesc) GetModifytime() int64

func (*PBFileDesc) GetSize

func (m *PBFileDesc) GetSize() int64

func (*PBFileDesc) GetTargetrelativepath

func (m *PBFileDesc) GetTargetrelativepath() string

func (*PBFileDesc) ProtoMessage

func (*PBFileDesc) ProtoMessage()

func (*PBFileDesc) Reset

func (m *PBFileDesc) Reset()

func (*PBFileDesc) String

func (m *PBFileDesc) String() string

func (*PBFileDesc) XXX_DiscardUnknown

func (m *PBFileDesc) XXX_DiscardUnknown()

func (*PBFileDesc) XXX_Marshal

func (m *PBFileDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBFileDesc) XXX_Merge

func (dst *PBFileDesc) XXX_Merge(src proto.Message)

func (*PBFileDesc) XXX_Size

func (m *PBFileDesc) XXX_Size() int

func (*PBFileDesc) XXX_Unmarshal

func (m *PBFileDesc) XXX_Unmarshal(b []byte) error

type PBFileResult

type PBFileResult struct {
	Fullpath             *string  `protobuf:"bytes,1,req,name=fullpath" json:"fullpath,omitempty"`
	Retcode              *int32   `protobuf:"varint,2,req,name=retcode" json:"retcode,omitempty"`
	Targetrelativepath   *string  `protobuf:"bytes,3,opt,name=targetrelativepath" json:"targetrelativepath,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBFileResult) Descriptor

func (*PBFileResult) Descriptor() ([]byte, []int)

func (*PBFileResult) GetFullpath

func (m *PBFileResult) GetFullpath() string

func (*PBFileResult) GetRetcode

func (m *PBFileResult) GetRetcode() int32

func (*PBFileResult) GetTargetrelativepath

func (m *PBFileResult) GetTargetrelativepath() string

func (*PBFileResult) ProtoMessage

func (*PBFileResult) ProtoMessage()

func (*PBFileResult) Reset

func (m *PBFileResult) Reset()

func (*PBFileResult) String

func (m *PBFileResult) String() string

func (*PBFileResult) XXX_DiscardUnknown

func (m *PBFileResult) XXX_DiscardUnknown()

func (*PBFileResult) XXX_Marshal

func (m *PBFileResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBFileResult) XXX_Merge

func (dst *PBFileResult) XXX_Merge(src proto.Message)

func (*PBFileResult) XXX_Size

func (m *PBFileResult) XXX_Size() int

func (*PBFileResult) XXX_Unmarshal

func (m *PBFileResult) XXX_Unmarshal(b []byte) error

type PBHead

type PBHead struct {
	Version              *string    `protobuf:"bytes,1,req,name=version" json:"version,omitempty"`
	Magic                *string    `protobuf:"bytes,2,req,name=magic" json:"magic,omitempty"`
	Bodylen              *int32     `protobuf:"varint,3,req,name=bodylen" json:"bodylen,omitempty"`
	Buflen               *int64     `protobuf:"varint,4,req,name=buflen" json:"buflen,omitempty"`
	Cmdtype              *PBCmdType `protobuf:"varint,5,req,name=cmdtype,enum=protocol.PBCmdType" json:"cmdtype,omitempty"`
	Business             *string    `protobuf:"bytes,6,opt,name=business" json:"business,omitempty"`
	Taskid               *string    `protobuf:"bytes,7,opt,name=taskid" json:"taskid,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*PBHead) Descriptor

func (*PBHead) Descriptor() ([]byte, []int)

func (*PBHead) GetBodylen

func (m *PBHead) GetBodylen() int32

func (*PBHead) GetBuflen

func (m *PBHead) GetBuflen() int64

func (*PBHead) GetBusiness

func (m *PBHead) GetBusiness() string

func (*PBHead) GetCmdtype

func (m *PBHead) GetCmdtype() PBCmdType

func (*PBHead) GetMagic

func (m *PBHead) GetMagic() string

func (*PBHead) GetTaskid

func (m *PBHead) GetTaskid() string

func (*PBHead) GetVersion

func (m *PBHead) GetVersion() string

func (*PBHead) ProtoMessage

func (*PBHead) ProtoMessage()

func (*PBHead) Reset

func (m *PBHead) Reset()

func (*PBHead) String

func (m *PBHead) String() string

func (*PBHead) XXX_DiscardUnknown

func (m *PBHead) XXX_DiscardUnknown()

func (*PBHead) XXX_Marshal

func (m *PBHead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBHead) XXX_Merge

func (dst *PBHead) XXX_Merge(src proto.Message)

func (*PBHead) XXX_Size

func (m *PBHead) XXX_Size() int

func (*PBHead) XXX_Unmarshal

func (m *PBHead) XXX_Unmarshal(b []byte) error

type PBResult

type PBResult struct {
	Cmd                  *PBCommand     `protobuf:"bytes,1,req,name=cmd" json:"cmd,omitempty"`
	Retcode              *int32         `protobuf:"varint,2,req,name=retcode" json:"retcode,omitempty"`
	Outputmessage        *string        `protobuf:"bytes,3,req,name=outputmessage" json:"outputmessage,omitempty"`
	Errormessage         *string        `protobuf:"bytes,4,req,name=errormessage" json:"errormessage,omitempty"`
	Resultfiles          []*PBFileDesc  `protobuf:"bytes,5,rep,name=resultfiles" json:"resultfiles,omitempty"`
	Stats                []*PBStatEntry `protobuf:"bytes,6,rep,name=stats" json:"stats,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*PBResult) Descriptor

func (*PBResult) Descriptor() ([]byte, []int)

func (*PBResult) GetCmd

func (m *PBResult) GetCmd() *PBCommand

func (*PBResult) GetErrormessage

func (m *PBResult) GetErrormessage() string

func (*PBResult) GetOutputmessage

func (m *PBResult) GetOutputmessage() string

func (*PBResult) GetResultfiles

func (m *PBResult) GetResultfiles() []*PBFileDesc

func (*PBResult) GetRetcode

func (m *PBResult) GetRetcode() int32

func (*PBResult) GetStats

func (m *PBResult) GetStats() []*PBStatEntry

func (*PBResult) ProtoMessage

func (*PBResult) ProtoMessage()

func (*PBResult) Reset

func (m *PBResult) Reset()

func (*PBResult) String

func (m *PBResult) String() string

func (*PBResult) XXX_DiscardUnknown

func (m *PBResult) XXX_DiscardUnknown()

func (*PBResult) XXX_Marshal

func (m *PBResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBResult) XXX_Merge

func (dst *PBResult) XXX_Merge(src proto.Message)

func (*PBResult) XXX_Size

func (m *PBResult) XXX_Size() int

func (*PBResult) XXX_Unmarshal

func (m *PBResult) XXX_Unmarshal(b []byte) error

type PBStatEntry

type PBStatEntry struct {
	Key                  *string  `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Time                 *int64   `protobuf:"varint,2,req,name=time" json:"time,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PBStatEntry) Descriptor

func (*PBStatEntry) Descriptor() ([]byte, []int)

func (*PBStatEntry) GetKey

func (m *PBStatEntry) GetKey() string

func (*PBStatEntry) GetTime

func (m *PBStatEntry) GetTime() int64

func (*PBStatEntry) ProtoMessage

func (*PBStatEntry) ProtoMessage()

func (*PBStatEntry) Reset

func (m *PBStatEntry) Reset()

func (*PBStatEntry) String

func (m *PBStatEntry) String() string

func (*PBStatEntry) XXX_DiscardUnknown

func (m *PBStatEntry) XXX_DiscardUnknown()

func (*PBStatEntry) XXX_Marshal

func (m *PBStatEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PBStatEntry) XXX_Merge

func (dst *PBStatEntry) XXX_Merge(src proto.Message)

func (*PBStatEntry) XXX_Size

func (m *PBStatEntry) XXX_Size() int

func (*PBStatEntry) XXX_Unmarshal

func (m *PBStatEntry) XXX_Unmarshal(b []byte) error

type RegTaskHostsReq

type RegTaskHostsReq struct {
	Taskinfo TaskKey
	Hosts    []Host `json:"hosts"`
	HostsRaw string `json:"hosts_raw"`
}

RegTaskHostsReq json struct to register hosts for one task

type RegTaskHostsRsp

type RegTaskHostsRsp struct {
	Retcode int32  `json:"retcode"`
	Message string `json:"message"`
}

RegTaskHostsRsp response data for reg-hosts

type ReturnHostReq

type ReturnHostReq struct {
	TaskID string     `json:"task_id"`
	Slots  []HostSlot `json:"host_slots"`
}

ReturnHostReq request data to return host slot

type ReturnHostRsp

type ReturnHostRsp struct {
	Retcode int32  `json:"retcode"`
	Message string `json:"message"`
}

ReturnHostRsp response data for return host slot

type TaskKey

type TaskKey struct {
	TaskID    string `json:"task_id"` // if not obtained from server, should generated one
	ProjectID string `json:"project_id"`
	BuildID   string `json:"build_id"`
	ProcessID string `json:"process_id"`
}

TaskKey key for task

type UnregTaskHostsReq

type UnregTaskHostsReq struct {
	Taskinfo TaskKey
	Hosts    []Host `json:"hosts"`
	HostsRaw string `json:"hosts_raw"`
}

UnregTaskHostsReq json struct to unregister hosts for one task

type UnregTaskHostsRsp

type UnregTaskHostsRsp struct {
	Retcode int32  `json:"retcode"`
	Message string `json:"message"`
}

UnregTaskHostsRsp response data for unreg-hosts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL