Documentation ¶
Overview ¶
Package model is a generated protocol buffer package.
It is generated from these files:
model.proto cluster.proto
It has these top-level messages:
Instance ConnectionStatus InstanceState FailureMessage Template NoneTemplate LxcTemplate QemuTemplate EsxiTemplate NullTemplate Console ExecutorNode SchedulerNode AgentNode CrashedNode NodeState
Index ¶
- Variables
- func Close(ctx context.Context) error
- func ClusterClose(ctx context.Context) error
- func ClusterConnect(ctx context.Context, dest backend.ConnectionAddress) (context.Context, error)
- func Connect(ctx context.Context, dest backend.ConnectionAddress) (context.Context, error)
- func GetBackendCtx(ctx context.Context) backend.ModelBackend
- func GetClusterBackendCtx(ctx context.Context) backend.ClusterBackend
- func GrpcInterceptor(modelAddr backend.ConnectionAddress, clusterCtx context.Context) grpc.UnaryServerInterceptor
- func GrpcStreamInterceptor(modelAddr backend.ConnectionAddress, clusterCtx context.Context) grpc.StreamServerInterceptor
- func InstallSchemas(bk backend.ModelSchema) error
- func IsMatchingNodeGroups(res InstanceResource, offered []string) bool
- func WithMockClusterBackendCtx(ctx context.Context) context.Context
- type AgentNode
- type ClusterNode
- type ClusterOps
- type ConnectionStatus
- type ConnectionStatus_Status
- type Console
- type Console_Transport
- type CrashedAgentNode
- type CrashedNode
- func (*CrashedNode) Descriptor() ([]byte, []int)
- func (m *CrashedNode) GetAgentId() string
- func (m *CrashedNode) GetAgentMesosId() string
- func (m *CrashedNode) GetCreatedAt() *google_protobuf.Timestamp
- func (m *CrashedNode) GetReconnected() bool
- func (m *CrashedNode) GetReconnectedAt() *google_protobuf.Timestamp
- func (m *CrashedNode) GetUuid() string
- func (*CrashedNode) ProtoMessage()
- func (m *CrashedNode) Reset()
- func (m *CrashedNode) String() string
- type CrashedNodesOps
- type EsxiTemplate
- func (*EsxiTemplate) Descriptor() ([]byte, []int)
- func (m *EsxiTemplate) GetEsxiImage() *EsxiTemplate_Image
- func (m *EsxiTemplate) GetInterfaces() []*EsxiTemplate_Interface
- func (m *EsxiTemplate) GetMemoryGb() int32
- func (m *EsxiTemplate) GetMinMemoryGb() int32
- func (m *EsxiTemplate) GetMinVcpu() int32
- func (m *EsxiTemplate) GetNodeGroups() []string
- func (m *EsxiTemplate) GetVcpu() int32
- func (*EsxiTemplate) ProtoMessage()
- func (m *EsxiTemplate) Reset()
- func (*EsxiTemplate) ResourceName() string
- func (m *EsxiTemplate) String() string
- type EsxiTemplate_Image
- func (*EsxiTemplate_Image) Descriptor() ([]byte, []int)
- func (m *EsxiTemplate_Image) GetChksum() string
- func (m *EsxiTemplate_Image) GetChksumType() string
- func (m *EsxiTemplate_Image) GetDatastore() string
- func (m *EsxiTemplate_Image) GetName() string
- func (*EsxiTemplate_Image) ProtoMessage()
- func (m *EsxiTemplate_Image) Reset()
- func (m *EsxiTemplate_Image) String() string
- type EsxiTemplate_Interface
- func (*EsxiTemplate_Interface) Descriptor() ([]byte, []int)
- func (m *EsxiTemplate_Interface) GetIpv4Addr() string
- func (m *EsxiTemplate_Interface) GetIpv4Gateway() string
- func (m *EsxiTemplate_Interface) GetMacaddr() string
- func (m *EsxiTemplate_Interface) GetNetworkId() string
- func (m *EsxiTemplate_Interface) GetType() string
- func (*EsxiTemplate_Interface) ProtoMessage()
- func (m *EsxiTemplate_Interface) Reset()
- func (m *EsxiTemplate_Interface) String() string
- type ExecutorNode
- func (*ExecutorNode) Descriptor() ([]byte, []int)
- func (m *ExecutorNode) GetConsole() *Console
- func (m *ExecutorNode) GetCreatedAt() *google_protobuf.Timestamp
- func (m *ExecutorNode) GetGrpcAddr() string
- func (m *ExecutorNode) GetId() string
- func (m *ExecutorNode) GetLastState() *NodeState
- func (*ExecutorNode) ProtoMessage()
- func (m *ExecutorNode) Reset()
- func (m *ExecutorNode) String() string
- type FailureMessage
- type FailureMessage_ErrorType
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)
- func (m *Instance) GetAutoRecovery() bool
- func (m *Instance) GetConnectionStatus() *ConnectionStatus
- func (m *Instance) GetCreatedAt() *google_protobuf.Timestamp
- func (m *Instance) GetId() string
- func (m *Instance) GetLastState() *InstanceState
- func (m *Instance) GetLatestFailure() *FailureMessage
- func (m *Instance) GetSlaveId() string
- func (m *Instance) GetTemplate() *Template
- func (*Instance) ProtoMessage()
- func (m *Instance) Reset()
- func (i *Instance) ResourceTemplate() ResourceTemplate
- func (m *Instance) String() string
- type InstanceOps
- type InstanceResource
- type InstanceState
- func (*InstanceState) Descriptor() ([]byte, []int)
- func (m *InstanceState) GetCreatedAt() *google_protobuf.Timestamp
- func (m *InstanceState) GetState() InstanceState_State
- func (*InstanceState) ProtoMessage()
- func (i *InstanceState) ReadyForConsole() error
- func (m *InstanceState) Reset()
- func (m *InstanceState) String() string
- func (i *InstanceState) ValidateGoalState(goal InstanceState_State) error
- func (i *InstanceState) ValidateNextState(next InstanceState_State) error
- type InstanceStateSlice
- type InstanceState_State
- type LxcTemplate
- func (*LxcTemplate) Descriptor() ([]byte, []int)
- func (m *LxcTemplate) GetInterfaces() []*LxcTemplate_Interface
- func (m *LxcTemplate) GetLxcImage() *LxcTemplate_Image
- func (m *LxcTemplate) GetLxcTemplate() *LxcTemplate_Template
- func (m *LxcTemplate) GetMemoryGb() int32
- func (m *LxcTemplate) GetMinMemoryGb() int32
- func (m *LxcTemplate) GetMinVcpu() int32
- func (m *LxcTemplate) GetNodeGroups() []string
- func (m *LxcTemplate) GetVcpu() int32
- func (*LxcTemplate) ProtoMessage()
- func (m *LxcTemplate) Reset()
- func (*LxcTemplate) ResourceName() string
- func (m *LxcTemplate) String() string
- type LxcTemplate_Image
- func (*LxcTemplate_Image) Descriptor() ([]byte, []int)
- func (m *LxcTemplate_Image) GetChksum() string
- func (m *LxcTemplate_Image) GetChksumType() string
- func (m *LxcTemplate_Image) GetDownloadUrl() string
- func (*LxcTemplate_Image) ProtoMessage()
- func (m *LxcTemplate_Image) Reset()
- func (m *LxcTemplate_Image) String() string
- type LxcTemplate_Interface
- func (*LxcTemplate_Interface) Descriptor() ([]byte, []int)
- func (m *LxcTemplate_Interface) GetIpv4Addr() string
- func (m *LxcTemplate_Interface) GetIpv4Gateway() string
- func (m *LxcTemplate_Interface) GetMacaddr() string
- func (m *LxcTemplate_Interface) GetType() string
- func (*LxcTemplate_Interface) ProtoMessage()
- func (m *LxcTemplate_Interface) Reset()
- func (m *LxcTemplate_Interface) String() string
- type LxcTemplate_Template
- func (*LxcTemplate_Template) Descriptor() ([]byte, []int)
- func (m *LxcTemplate_Template) GetArch() string
- func (m *LxcTemplate_Template) GetBackend() int32
- func (m *LxcTemplate_Template) GetDisableGpgValidation() bool
- func (m *LxcTemplate_Template) GetDistro() string
- func (m *LxcTemplate_Template) GetExtraArgs() []string
- func (m *LxcTemplate_Template) GetFlushCache() bool
- func (m *LxcTemplate_Template) GetForceCache() bool
- func (m *LxcTemplate_Template) GetKeyId() string
- func (m *LxcTemplate_Template) GetKeyServer() string
- func (m *LxcTemplate_Template) GetRelease() string
- func (m *LxcTemplate_Template) GetServer() string
- func (m *LxcTemplate_Template) GetTemplate() string
- func (m *LxcTemplate_Template) GetVariant() string
- func (*LxcTemplate_Template) ProtoMessage()
- func (m *LxcTemplate_Template) Reset()
- func (m *LxcTemplate_Template) String() string
- type Node
- type NodeOps
- type NodeState
- type NodeState_State
- type NoneTemplate
- type NullTemplate
- func (*NullTemplate) Descriptor() ([]byte, []int)
- func (m *NullTemplate) GetCrashStage() NullTemplate_CrashStage
- func (m *NullTemplate) GetMemoryGb() int32
- func (m *NullTemplate) GetNodeGroups() []string
- func (m *NullTemplate) GetVcpu() int32
- func (*NullTemplate) ProtoMessage()
- func (m *NullTemplate) Reset()
- func (*NullTemplate) ResourceName() string
- func (m *NullTemplate) String() string
- type NullTemplate_CrashStage
- type QemuTemplate
- func (*QemuTemplate) Descriptor() ([]byte, []int)
- func (m *QemuTemplate) GetInterfaces() []*QemuTemplate_Interface
- func (m *QemuTemplate) GetMemoryGb() int32
- func (m *QemuTemplate) GetMinMemoryGb() int32
- func (m *QemuTemplate) GetMinVcpu() int32
- func (m *QemuTemplate) GetNodeGroups() []string
- func (m *QemuTemplate) GetQemuImage() *QemuTemplate_Image
- func (m *QemuTemplate) GetUseKvm() bool
- func (m *QemuTemplate) GetVcpu() int32
- func (*QemuTemplate) ProtoMessage()
- func (m *QemuTemplate) Reset()
- func (*QemuTemplate) ResourceName() string
- func (m *QemuTemplate) String() string
- type QemuTemplate_Image
- func (*QemuTemplate_Image) Descriptor() ([]byte, []int)
- func (m *QemuTemplate_Image) GetChksum() string
- func (m *QemuTemplate_Image) GetChksumType() string
- func (m *QemuTemplate_Image) GetDownloadUrl() string
- func (m *QemuTemplate_Image) GetFormat() QemuTemplate_Image_Format
- func (*QemuTemplate_Image) ProtoMessage()
- func (m *QemuTemplate_Image) Reset()
- func (m *QemuTemplate_Image) String() string
- type QemuTemplate_Image_Format
- type QemuTemplate_Interface
- func (*QemuTemplate_Interface) Descriptor() ([]byte, []int)
- func (m *QemuTemplate_Interface) GetIpv4Addr() string
- func (m *QemuTemplate_Interface) GetIpv4Gateway() string
- func (m *QemuTemplate_Interface) GetMacaddr() string
- func (m *QemuTemplate_Interface) GetType() string
- func (*QemuTemplate_Interface) ProtoMessage()
- func (m *QemuTemplate_Interface) Reset()
- func (m *QemuTemplate_Interface) String() string
- type ResourceTemplate
- type SchedulerNode
- type Template
- func (*Template) Descriptor() ([]byte, []int)
- func (m *Template) GetCreatedAt() *google_protobuf.Timestamp
- func (m *Template) GetEsxi() *EsxiTemplate
- func (m *Template) GetItem() isTemplate_Item
- func (m *Template) GetLxc() *LxcTemplate
- func (m *Template) GetNone() *NoneTemplate
- func (m *Template) GetNull() *NullTemplate
- func (m *Template) GetQemu() *QemuTemplate
- func (m *Template) GetTemplateUri() string
- func (*Template) ProtoMessage()
- func (m *Template) Reset()
- func (t *Template) ResourceTemplate() ResourceTemplate
- func (m *Template) String() string
- func (*Template) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Template_Esxi
- type Template_Lxc
- type Template_None
- type Template_Null
- type Template_Qemu
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConnectionStatus_Status_name = map[int32]string{
0: "NONE",
1: "CONNECTED",
2: "NOT_CONNECTED",
}
View Source
var ConnectionStatus_Status_value = map[string]int32{
"NONE": 0,
"CONNECTED": 1,
"NOT_CONNECTED": 2,
}
View Source
var Console_Transport_name = map[int32]string{
0: "SSH",
}
View Source
var Console_Transport_value = map[string]int32{
"SSH": 0,
}
View Source
var ErrBackendNotInContext = errors.New("Given context does not have the backend object")
View Source
var ErrInvalidID = errors.New("ID is missing")
View Source
var FailureMessage_ErrorType_name = map[int32]string{
0: "FAILED_BOOT",
1: "FAILED_START",
2: "FAILED_STOP",
3: "FAILED_REBOOT",
4: "FAILED_TERMINATE",
}
View Source
var FailureMessage_ErrorType_value = map[string]int32{
"FAILED_BOOT": 0,
"FAILED_START": 1,
"FAILED_STOP": 2,
"FAILED_REBOOT": 3,
"FAILED_TERMINATE": 4,
}
View Source
var InstanceState_State_name = map[int32]string{
0: "REGISTERED",
1: "QUEUED",
2: "STARTING",
3: "RUNNING",
4: "STOPPING",
5: "STOPPED",
6: "REBOOTING",
7: "SHUTTINGDOWN",
8: "TERMINATED",
9: "FAILED",
}
View Source
var InstanceState_State_value = map[string]int32{
"REGISTERED": 0,
"QUEUED": 1,
"STARTING": 2,
"RUNNING": 3,
"STOPPING": 4,
"STOPPED": 5,
"REBOOTING": 6,
"SHUTTINGDOWN": 7,
"TERMINATED": 8,
"FAILED": 9,
}
View Source
var NodeState_State_name = map[int32]string{
0: "REGISTERED",
}
View Source
var NodeState_State_value = map[string]int32{
"REGISTERED": 0,
}
View Source
var NullTemplate_CrashStage_name = map[int32]string{
0: "NONE",
1: "START",
2: "STOP",
3: "CREATE",
4: "DESTROY",
5: "REBOOT",
}
View Source
var NullTemplate_CrashStage_value = map[string]int32{
"NONE": 0,
"START": 1,
"STOP": 2,
"CREATE": 3,
"DESTROY": 4,
"REBOOT": 5,
}
View Source
var QemuTemplate_Image_Format_name = map[int32]string{
0: "RAW",
1: "QCOW2",
}
View Source
var QemuTemplate_Image_Format_value = map[string]int32{
"RAW": 0,
"QCOW2": 1,
}
Functions ¶
func ClusterClose ¶
func ClusterConnect ¶
func GetBackendCtx ¶
func GetBackendCtx(ctx context.Context) backend.ModelBackend
func GetClusterBackendCtx ¶
func GetClusterBackendCtx(ctx context.Context) backend.ClusterBackend
func GrpcInterceptor ¶
func GrpcInterceptor(modelAddr backend.ConnectionAddress, clusterCtx context.Context) grpc.UnaryServerInterceptor
func GrpcStreamInterceptor ¶
func GrpcStreamInterceptor(modelAddr backend.ConnectionAddress, clusterCtx context.Context) grpc.StreamServerInterceptor
func InstallSchemas ¶
func InstallSchemas(bk backend.ModelSchema) error
func IsMatchingNodeGroups ¶
func IsMatchingNodeGroups(res InstanceResource, offered []string) bool
Types ¶
type AgentNode ¶
type AgentNode struct { AgentMesosId string `protobuf:"bytes,1,opt,name=agent_mesos_id,json=agentMesosId" json:"agent_mesos_id,omitempty"` AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` }
func (*AgentNode) Descriptor ¶
func (*AgentNode) GetAgentId ¶
func (*AgentNode) GetAgentMesosId ¶
func (*AgentNode) GetCreatedAt ¶
func (m *AgentNode) GetCreatedAt() *google_protobuf.Timestamp
func (*AgentNode) ProtoMessage ¶
func (*AgentNode) ProtoMessage()
type ClusterNode ¶
type ClusterNode interface { proto.Message GetId() string // contains filtered or unexported methods }
ClusterNode is a marker interface. Protobuf object implements this is allowed to store in /cluster key space.
type ClusterOps ¶
type ClusterOps interface { Register(node ClusterNode) error Find(nodeID string, node ClusterNode) error Unregister(nodeID string) error }
func Cluster ¶
func Cluster(ctx context.Context) ClusterOps
type ConnectionStatus ¶
type ConnectionStatus struct {
Status ConnectionStatus_Status `protobuf:"varint,1,opt,name=status,enum=model.ConnectionStatus_Status" json:"status,omitempty"`
}
func (*ConnectionStatus) Descriptor ¶
func (*ConnectionStatus) Descriptor() ([]byte, []int)
func (*ConnectionStatus) GetStatus ¶
func (m *ConnectionStatus) GetStatus() ConnectionStatus_Status
func (*ConnectionStatus) ProtoMessage ¶
func (*ConnectionStatus) ProtoMessage()
func (*ConnectionStatus) Reset ¶
func (m *ConnectionStatus) Reset()
func (*ConnectionStatus) String ¶
func (m *ConnectionStatus) String() string
type ConnectionStatus_Status ¶
type ConnectionStatus_Status int32
const ( ConnectionStatus_NONE ConnectionStatus_Status = 0 ConnectionStatus_CONNECTED ConnectionStatus_Status = 1 ConnectionStatus_NOT_CONNECTED ConnectionStatus_Status = 2 )
func (ConnectionStatus_Status) EnumDescriptor ¶
func (ConnectionStatus_Status) EnumDescriptor() ([]byte, []int)
func (ConnectionStatus_Status) String ¶
func (x ConnectionStatus_Status) String() string
type Console ¶
type Console struct { Type Console_Transport `protobuf:"varint,1,opt,name=type,enum=model.Console_Transport" json:"type,omitempty"` BindAddr string `protobuf:"bytes,2,opt,name=bind_addr" json:"bind_addr,omitempty"` }
func (*Console) Descriptor ¶
func (*Console) GetBindAddr ¶
func (*Console) GetType ¶
func (m *Console) GetType() Console_Transport
func (*Console) ProtoMessage ¶
func (*Console) ProtoMessage()
type Console_Transport ¶
type Console_Transport int32
const (
Console_SSH Console_Transport = 0
)
func (Console_Transport) EnumDescriptor ¶
func (Console_Transport) EnumDescriptor() ([]byte, []int)
func (Console_Transport) String ¶
func (x Console_Transport) String() string
type CrashedAgentNode ¶
type CrashedNode ¶
type CrashedNode struct { Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"` AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` AgentMesosId string `protobuf:"bytes,3,opt,name=agent_mesos_id,json=agentMesosId" json:"agent_mesos_id,omitempty"` Reconnected bool `protobuf:"varint,4,opt,name=reconnected" json:"reconnected,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` ReconnectedAt *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=reconnected_at,json=reconnectedAt" json:"reconnected_at,omitempty"` }
func (*CrashedNode) Descriptor ¶
func (*CrashedNode) Descriptor() ([]byte, []int)
func (*CrashedNode) GetAgentId ¶
func (m *CrashedNode) GetAgentId() string
func (*CrashedNode) GetAgentMesosId ¶
func (m *CrashedNode) GetAgentMesosId() string
func (*CrashedNode) GetCreatedAt ¶
func (m *CrashedNode) GetCreatedAt() *google_protobuf.Timestamp
func (*CrashedNode) GetReconnected ¶
func (m *CrashedNode) GetReconnected() bool
func (*CrashedNode) GetReconnectedAt ¶
func (m *CrashedNode) GetReconnectedAt() *google_protobuf.Timestamp
func (*CrashedNode) GetUuid ¶
func (m *CrashedNode) GetUuid() string
func (*CrashedNode) ProtoMessage ¶
func (*CrashedNode) ProtoMessage()
func (*CrashedNode) Reset ¶
func (m *CrashedNode) Reset()
func (*CrashedNode) String ¶
func (m *CrashedNode) String() string
type CrashedNodesOps ¶
type CrashedNodesOps interface { Add(node *CrashedNode) error FindByAgentMesosIDNotReconnected(agentMesosID string) (*CrashedNode, error) FindByAgentMesosID(agentMesosID string) (*CrashedNode, error) FindByAgentID(agentID string) (*CrashedNode, error) FindByUUID(nodeUUID string) (*CrashedNode, error) Filter(limit int, cb func(*CrashedNode) int) error SetReconnected(node *CrashedNode) error }
func CrashedNodes ¶
func CrashedNodes(ctx context.Context) CrashedNodesOps
type EsxiTemplate ¶
type EsxiTemplate struct { Vcpu int32 `protobuf:"varint,1,opt,name=vcpu" json:"vcpu,omitempty"` MemoryGb int32 `protobuf:"varint,2,opt,name=memory_gb" json:"memory_gb,omitempty"` MinVcpu int32 `protobuf:"varint,3,opt,name=min_vcpu" json:"min_vcpu,omitempty"` MinMemoryGb int32 `protobuf:"varint,4,opt,name=min_memory_gb" json:"min_memory_gb,omitempty"` EsxiImage *EsxiTemplate_Image `protobuf:"bytes,5,opt,name=esxi_image" json:"esxi_image,omitempty"` Interfaces []*EsxiTemplate_Interface `protobuf:"bytes,6,rep,name=interfaces" json:"interfaces,omitempty"` NodeGroups []string `protobuf:"bytes,7,rep,name=node_groups" json:"node_groups,omitempty"` }
func (*EsxiTemplate) Descriptor ¶
func (*EsxiTemplate) Descriptor() ([]byte, []int)
func (*EsxiTemplate) GetEsxiImage ¶
func (m *EsxiTemplate) GetEsxiImage() *EsxiTemplate_Image
func (*EsxiTemplate) GetInterfaces ¶
func (m *EsxiTemplate) GetInterfaces() []*EsxiTemplate_Interface
func (*EsxiTemplate) GetMemoryGb ¶
func (m *EsxiTemplate) GetMemoryGb() int32
func (*EsxiTemplate) GetMinMemoryGb ¶
func (m *EsxiTemplate) GetMinMemoryGb() int32
func (*EsxiTemplate) GetMinVcpu ¶
func (m *EsxiTemplate) GetMinVcpu() int32
func (*EsxiTemplate) GetNodeGroups ¶
func (m *EsxiTemplate) GetNodeGroups() []string
func (*EsxiTemplate) GetVcpu ¶
func (m *EsxiTemplate) GetVcpu() int32
func (*EsxiTemplate) ProtoMessage ¶
func (*EsxiTemplate) ProtoMessage()
func (*EsxiTemplate) Reset ¶
func (m *EsxiTemplate) Reset()
func (*EsxiTemplate) ResourceName ¶
func (*EsxiTemplate) ResourceName() string
func (*EsxiTemplate) String ¶
func (m *EsxiTemplate) String() string
type EsxiTemplate_Image ¶
type EsxiTemplate_Image struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Datastore string `protobuf:"bytes,2,opt,name=datastore" json:"datastore,omitempty"` ChksumType string `protobuf:"bytes,3,opt,name=chksum_type" json:"chksum_type,omitempty"` Chksum string `protobuf:"bytes,4,opt,name=chksum" json:"chksum,omitempty"` }
func (*EsxiTemplate_Image) Descriptor ¶
func (*EsxiTemplate_Image) Descriptor() ([]byte, []int)
func (*EsxiTemplate_Image) GetChksum ¶
func (m *EsxiTemplate_Image) GetChksum() string
func (*EsxiTemplate_Image) GetChksumType ¶
func (m *EsxiTemplate_Image) GetChksumType() string
func (*EsxiTemplate_Image) GetDatastore ¶
func (m *EsxiTemplate_Image) GetDatastore() string
func (*EsxiTemplate_Image) GetName ¶
func (m *EsxiTemplate_Image) GetName() string
func (*EsxiTemplate_Image) ProtoMessage ¶
func (*EsxiTemplate_Image) ProtoMessage()
func (*EsxiTemplate_Image) Reset ¶
func (m *EsxiTemplate_Image) Reset()
func (*EsxiTemplate_Image) String ¶
func (m *EsxiTemplate_Image) String() string
type EsxiTemplate_Interface ¶
type EsxiTemplate_Interface struct { NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId" json:"network_id,omitempty"` Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` Macaddr string `protobuf:"bytes,3,opt,name=macaddr" json:"macaddr,omitempty"` Ipv4Addr string `protobuf:"bytes,4,opt,name=ipv4addr" json:"ipv4addr,omitempty"` Ipv4Gateway string `protobuf:"bytes,5,opt,name=ipv4gateway" json:"ipv4gateway,omitempty"` }
func (*EsxiTemplate_Interface) Descriptor ¶
func (*EsxiTemplate_Interface) Descriptor() ([]byte, []int)
func (*EsxiTemplate_Interface) GetIpv4Addr ¶
func (m *EsxiTemplate_Interface) GetIpv4Addr() string
func (*EsxiTemplate_Interface) GetIpv4Gateway ¶
func (m *EsxiTemplate_Interface) GetIpv4Gateway() string
func (*EsxiTemplate_Interface) GetMacaddr ¶
func (m *EsxiTemplate_Interface) GetMacaddr() string
func (*EsxiTemplate_Interface) GetNetworkId ¶
func (m *EsxiTemplate_Interface) GetNetworkId() string
func (*EsxiTemplate_Interface) GetType ¶
func (m *EsxiTemplate_Interface) GetType() string
func (*EsxiTemplate_Interface) ProtoMessage ¶
func (*EsxiTemplate_Interface) ProtoMessage()
func (*EsxiTemplate_Interface) Reset ¶
func (m *EsxiTemplate_Interface) Reset()
func (*EsxiTemplate_Interface) String ¶
func (m *EsxiTemplate_Interface) String() string
type ExecutorNode ¶
type ExecutorNode struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at" json:"created_at,omitempty"` Console *Console `protobuf:"bytes,3,opt,name=console" json:"console,omitempty"` GrpcAddr string `protobuf:"bytes,4,opt,name=grpc_addr" json:"grpc_addr,omitempty"` LastState *NodeState `protobuf:"bytes,5,opt,name=last_state" json:"last_state,omitempty"` }
func (*ExecutorNode) Descriptor ¶
func (*ExecutorNode) Descriptor() ([]byte, []int)
func (*ExecutorNode) GetConsole ¶
func (m *ExecutorNode) GetConsole() *Console
func (*ExecutorNode) GetCreatedAt ¶
func (m *ExecutorNode) GetCreatedAt() *google_protobuf.Timestamp
func (*ExecutorNode) GetGrpcAddr ¶
func (m *ExecutorNode) GetGrpcAddr() string
func (*ExecutorNode) GetId ¶
func (m *ExecutorNode) GetId() string
func (*ExecutorNode) GetLastState ¶
func (m *ExecutorNode) GetLastState() *NodeState
func (*ExecutorNode) ProtoMessage ¶
func (*ExecutorNode) ProtoMessage()
func (*ExecutorNode) Reset ¶
func (m *ExecutorNode) Reset()
func (*ExecutorNode) String ¶
func (m *ExecutorNode) String() string
type FailureMessage ¶
type FailureMessage struct { ErrorType FailureMessage_ErrorType `protobuf:"varint,1,opt,name=error_type,enum=model.FailureMessage_ErrorType" json:"error_type,omitempty"` FailedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=failed_at" json:"failed_at,omitempty"` }
func (*FailureMessage) Descriptor ¶
func (*FailureMessage) Descriptor() ([]byte, []int)
func (*FailureMessage) GetErrorType ¶
func (m *FailureMessage) GetErrorType() FailureMessage_ErrorType
func (*FailureMessage) GetFailedAt ¶
func (m *FailureMessage) GetFailedAt() *google_protobuf.Timestamp
func (*FailureMessage) ProtoMessage ¶
func (*FailureMessage) ProtoMessage()
func (*FailureMessage) Reset ¶
func (m *FailureMessage) Reset()
func (*FailureMessage) String ¶
func (m *FailureMessage) String() string
type FailureMessage_ErrorType ¶
type FailureMessage_ErrorType int32
const ( FailureMessage_FAILED_BOOT FailureMessage_ErrorType = 0 FailureMessage_FAILED_START FailureMessage_ErrorType = 1 FailureMessage_FAILED_STOP FailureMessage_ErrorType = 2 FailureMessage_FAILED_REBOOT FailureMessage_ErrorType = 3 FailureMessage_FAILED_TERMINATE FailureMessage_ErrorType = 4 )
func (FailureMessage_ErrorType) EnumDescriptor ¶
func (FailureMessage_ErrorType) EnumDescriptor() ([]byte, []int)
func (FailureMessage_ErrorType) String ¶
func (x FailureMessage_ErrorType) String() string
type Instance ¶
type Instance struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` SlaveId string `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` // string resource_id = 3; // Obsolete LastState *InstanceState `protobuf:"bytes,4,opt,name=last_state" json:"last_state,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=created_at" json:"created_at,omitempty"` Template *Template `protobuf:"bytes,6,opt,name=template" json:"template,omitempty"` LatestFailure *FailureMessage `protobuf:"bytes,7,opt,name=latest_failure" json:"latest_failure,omitempty"` AutoRecovery bool `protobuf:"varint,8,opt,name=auto_recovery" json:"auto_recovery,omitempty"` ConnectionStatus *ConnectionStatus `protobuf:"bytes,9,opt,name=connection_status" json:"connection_status,omitempty"` }
func (*Instance) Descriptor ¶
func (*Instance) GetAutoRecovery ¶
func (*Instance) GetConnectionStatus ¶
func (m *Instance) GetConnectionStatus() *ConnectionStatus
func (*Instance) GetCreatedAt ¶
func (m *Instance) GetCreatedAt() *google_protobuf.Timestamp
func (*Instance) GetLastState ¶
func (m *Instance) GetLastState() *InstanceState
func (*Instance) GetLatestFailure ¶
func (m *Instance) GetLatestFailure() *FailureMessage
func (*Instance) GetSlaveId ¶
func (*Instance) GetTemplate ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ResourceTemplate ¶
func (i *Instance) ResourceTemplate() ResourceTemplate
type InstanceOps ¶
type InstanceOps interface { Create(*Instance) (*Instance, error) FindByID(string) (*Instance, error) AddFailureMessage(id string, failureMessage FailureMessage_ErrorType) error //GetLatestFailureMessage(id string) (*FailureMessage, error) ForceUpdateState(id string, next InstanceState_State) error UpdateState(id string, next InstanceState_State) error UpdateConnectionStatus(id string, connStatus ConnectionStatus_Status) error FilterByState(state InstanceState_State) ([]*Instance, error) FilterByAgentMesosID(agentID string) ([]*Instance, error) Update(*Instance) error Filter(limit int, cb func(*Instance) int) error WaitStateUpdate(id string) (*InstanceState, error) }
func Instances ¶
func Instances(ctx context.Context) InstanceOps
type InstanceResource ¶
type InstanceResource interface { // protobuf message belongs to InstanceResource should have fields below: // int32 vcpu = xx; // int32 memory_gb = xx; // repeated string node_groups = xx; GetVcpu() int32 GetMemoryGb() int32 GetNodeGroups() []string // contains filtered or unexported methods }
InstanceResource is a marker interface for instance template structs.
type InstanceState ¶
type InstanceState struct { State InstanceState_State `protobuf:"varint,1,opt,name=state,enum=model.InstanceState_State" json:"state,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at" json:"created_at,omitempty"` }
func (*InstanceState) Descriptor ¶
func (*InstanceState) Descriptor() ([]byte, []int)
func (*InstanceState) GetCreatedAt ¶
func (m *InstanceState) GetCreatedAt() *google_protobuf.Timestamp
func (*InstanceState) GetState ¶
func (m *InstanceState) GetState() InstanceState_State
func (*InstanceState) ProtoMessage ¶
func (*InstanceState) ProtoMessage()
func (*InstanceState) ReadyForConsole ¶
func (i *InstanceState) ReadyForConsole() error
func (*InstanceState) Reset ¶
func (m *InstanceState) Reset()
func (*InstanceState) String ¶
func (m *InstanceState) String() string
func (*InstanceState) ValidateGoalState ¶
func (i *InstanceState) ValidateGoalState(goal InstanceState_State) error
func (*InstanceState) ValidateNextState ¶
func (i *InstanceState) ValidateNextState(next InstanceState_State) error
type InstanceStateSlice ¶
type InstanceStateSlice []InstanceState_State
var InstanceTerminalStates InstanceStateSlice = []InstanceState_State{ InstanceState_TERMINATED, InstanceState_FAILED, }
func (InstanceStateSlice) Contains ¶
func (s InstanceStateSlice) Contains(state InstanceState_State) bool
type InstanceState_State ¶
type InstanceState_State int32
const ( InstanceState_REGISTERED InstanceState_State = 0 InstanceState_QUEUED InstanceState_State = 1 InstanceState_STARTING InstanceState_State = 2 InstanceState_RUNNING InstanceState_State = 3 InstanceState_STOPPING InstanceState_State = 4 InstanceState_STOPPED InstanceState_State = 5 InstanceState_REBOOTING InstanceState_State = 6 InstanceState_SHUTTINGDOWN InstanceState_State = 7 InstanceState_TERMINATED InstanceState_State = 8 InstanceState_FAILED InstanceState_State = 9 )
func (InstanceState_State) EnumDescriptor ¶
func (InstanceState_State) EnumDescriptor() ([]byte, []int)
func (InstanceState_State) String ¶
func (x InstanceState_State) String() string
type LxcTemplate ¶
type LxcTemplate struct { Vcpu int32 `protobuf:"varint,1,opt,name=vcpu" json:"vcpu,omitempty"` MemoryGb int32 `protobuf:"varint,2,opt,name=memory_gb" json:"memory_gb,omitempty"` MinVcpu int32 `protobuf:"varint,3,opt,name=min_vcpu" json:"min_vcpu,omitempty"` MinMemoryGb int32 `protobuf:"varint,4,opt,name=min_memory_gb" json:"min_memory_gb,omitempty"` LxcImage *LxcTemplate_Image `protobuf:"bytes,5,opt,name=lxc_image" json:"lxc_image,omitempty"` Interfaces []*LxcTemplate_Interface `protobuf:"bytes,6,rep,name=interfaces" json:"interfaces,omitempty"` LxcTemplate *LxcTemplate_Template `protobuf:"bytes,7,opt,name=lxc_template" json:"lxc_template,omitempty"` NodeGroups []string `protobuf:"bytes,8,rep,name=node_groups" json:"node_groups,omitempty"` }
func (*LxcTemplate) Descriptor ¶
func (*LxcTemplate) Descriptor() ([]byte, []int)
func (*LxcTemplate) GetInterfaces ¶
func (m *LxcTemplate) GetInterfaces() []*LxcTemplate_Interface
func (*LxcTemplate) GetLxcImage ¶
func (m *LxcTemplate) GetLxcImage() *LxcTemplate_Image
func (*LxcTemplate) GetLxcTemplate ¶
func (m *LxcTemplate) GetLxcTemplate() *LxcTemplate_Template
func (*LxcTemplate) GetMemoryGb ¶
func (m *LxcTemplate) GetMemoryGb() int32
func (*LxcTemplate) GetMinMemoryGb ¶
func (m *LxcTemplate) GetMinMemoryGb() int32
func (*LxcTemplate) GetMinVcpu ¶
func (m *LxcTemplate) GetMinVcpu() int32
func (*LxcTemplate) GetNodeGroups ¶
func (m *LxcTemplate) GetNodeGroups() []string
func (*LxcTemplate) GetVcpu ¶
func (m *LxcTemplate) GetVcpu() int32
func (*LxcTemplate) ProtoMessage ¶
func (*LxcTemplate) ProtoMessage()
func (*LxcTemplate) Reset ¶
func (m *LxcTemplate) Reset()
func (*LxcTemplate) ResourceName ¶
func (*LxcTemplate) ResourceName() string
func (*LxcTemplate) String ¶
func (m *LxcTemplate) String() string
type LxcTemplate_Image ¶
type LxcTemplate_Image struct { DownloadUrl string `protobuf:"bytes,1,opt,name=download_url" json:"download_url,omitempty"` ChksumType string `protobuf:"bytes,2,opt,name=chksum_type" json:"chksum_type,omitempty"` Chksum string `protobuf:"bytes,3,opt,name=chksum" json:"chksum,omitempty"` }
func (*LxcTemplate_Image) Descriptor ¶
func (*LxcTemplate_Image) Descriptor() ([]byte, []int)
func (*LxcTemplate_Image) GetChksum ¶
func (m *LxcTemplate_Image) GetChksum() string
func (*LxcTemplate_Image) GetChksumType ¶
func (m *LxcTemplate_Image) GetChksumType() string
func (*LxcTemplate_Image) GetDownloadUrl ¶
func (m *LxcTemplate_Image) GetDownloadUrl() string
func (*LxcTemplate_Image) ProtoMessage ¶
func (*LxcTemplate_Image) ProtoMessage()
func (*LxcTemplate_Image) Reset ¶
func (m *LxcTemplate_Image) Reset()
func (*LxcTemplate_Image) String ¶
func (m *LxcTemplate_Image) String() string
type LxcTemplate_Interface ¶
type LxcTemplate_Interface struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` Macaddr string `protobuf:"bytes,2,opt,name=macaddr" json:"macaddr,omitempty"` Ipv4Addr string `protobuf:"bytes,3,opt,name=ipv4addr" json:"ipv4addr,omitempty"` // string bridge = 4; // Obsolete Ipv4Gateway string `protobuf:"bytes,5,opt,name=ipv4gateway" json:"ipv4gateway,omitempty"` }
func (*LxcTemplate_Interface) Descriptor ¶
func (*LxcTemplate_Interface) Descriptor() ([]byte, []int)
func (*LxcTemplate_Interface) GetIpv4Addr ¶
func (m *LxcTemplate_Interface) GetIpv4Addr() string
func (*LxcTemplate_Interface) GetIpv4Gateway ¶
func (m *LxcTemplate_Interface) GetIpv4Gateway() string
func (*LxcTemplate_Interface) GetMacaddr ¶
func (m *LxcTemplate_Interface) GetMacaddr() string
func (*LxcTemplate_Interface) GetType ¶
func (m *LxcTemplate_Interface) GetType() string
func (*LxcTemplate_Interface) ProtoMessage ¶
func (*LxcTemplate_Interface) ProtoMessage()
func (*LxcTemplate_Interface) Reset ¶
func (m *LxcTemplate_Interface) Reset()
func (*LxcTemplate_Interface) String ¶
func (m *LxcTemplate_Interface) String() string
type LxcTemplate_Template ¶
type LxcTemplate_Template struct { // Template specifies the name of the template. Template string `protobuf:"bytes,1,opt,name=template" json:"template,omitempty"` // Backend specifies the type of the backend. Backend int32 `protobuf:"varint,2,opt,name=backend" json:"backend,omitempty"` // Distro specifies the name of the distribution. Distro string `protobuf:"bytes,3,opt,name=distro" json:"distro,omitempty"` // Release specifies the name/version of the distribution. Release string `protobuf:"bytes,4,opt,name=release" json:"release,omitempty"` // Arch specified the architecture of the container. Arch string `protobuf:"bytes,5,opt,name=arch" json:"arch,omitempty"` // Variant specifies the variant of the image (default: "default"). Variant string `protobuf:"bytes,6,opt,name=variant" json:"variant,omitempty"` // Image server (default: "images.linuxcontainers.org"). Server string `protobuf:"bytes,7,opt,name=server" json:"server,omitempty"` // GPG keyid (default: 0x...). KeyId string `protobuf:"bytes,8,opt,name=key_id" json:"key_id,omitempty"` // GPG keyserver to use. KeyServer string `protobuf:"bytes,9,opt,name=key_server" json:"key_server,omitempty"` // Disable GPG validation (not recommended). DisableGpgValidation bool `protobuf:"varint,10,opt,name=disable_gpg_validation" json:"disable_gpg_validation,omitempty"` // Flush the local copy (if present). FlushCache bool `protobuf:"varint,11,opt,name=flush_cache" json:"flush_cache,omitempty"` // Force the use of the local copy even if expired. ForceCache bool `protobuf:"varint,12,opt,name=force_cache" json:"force_cache,omitempty"` // ExtraArgs provides a way to specify template specific args. ExtraArgs []string `protobuf:"bytes,13,rep,name=extra_args" json:"extra_args,omitempty"` }
func (*LxcTemplate_Template) Descriptor ¶
func (*LxcTemplate_Template) Descriptor() ([]byte, []int)
func (*LxcTemplate_Template) GetArch ¶
func (m *LxcTemplate_Template) GetArch() string
func (*LxcTemplate_Template) GetBackend ¶
func (m *LxcTemplate_Template) GetBackend() int32
func (*LxcTemplate_Template) GetDisableGpgValidation ¶
func (m *LxcTemplate_Template) GetDisableGpgValidation() bool
func (*LxcTemplate_Template) GetDistro ¶
func (m *LxcTemplate_Template) GetDistro() string
func (*LxcTemplate_Template) GetExtraArgs ¶
func (m *LxcTemplate_Template) GetExtraArgs() []string
func (*LxcTemplate_Template) GetFlushCache ¶
func (m *LxcTemplate_Template) GetFlushCache() bool
func (*LxcTemplate_Template) GetForceCache ¶
func (m *LxcTemplate_Template) GetForceCache() bool
func (*LxcTemplate_Template) GetKeyId ¶
func (m *LxcTemplate_Template) GetKeyId() string
func (*LxcTemplate_Template) GetKeyServer ¶
func (m *LxcTemplate_Template) GetKeyServer() string
func (*LxcTemplate_Template) GetRelease ¶
func (m *LxcTemplate_Template) GetRelease() string
func (*LxcTemplate_Template) GetServer ¶
func (m *LxcTemplate_Template) GetServer() string
func (*LxcTemplate_Template) GetTemplate ¶
func (m *LxcTemplate_Template) GetTemplate() string
func (*LxcTemplate_Template) GetVariant ¶
func (m *LxcTemplate_Template) GetVariant() string
func (*LxcTemplate_Template) ProtoMessage ¶
func (*LxcTemplate_Template) ProtoMessage()
func (*LxcTemplate_Template) Reset ¶
func (m *LxcTemplate_Template) Reset()
func (*LxcTemplate_Template) String ¶
func (m *LxcTemplate_Template) String() string
type NodeOps ¶
type NodeState ¶
type NodeState struct { State NodeState_State `protobuf:"varint,1,opt,name=state,enum=model.NodeState_State" json:"state,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at" json:"created_at,omitempty"` }
func (*NodeState) Descriptor ¶
func (*NodeState) GetCreatedAt ¶
func (m *NodeState) GetCreatedAt() *google_protobuf.Timestamp
func (*NodeState) GetState ¶
func (m *NodeState) GetState() NodeState_State
func (*NodeState) ProtoMessage ¶
func (*NodeState) ProtoMessage()
type NodeState_State ¶
type NodeState_State int32
const (
NodeState_REGISTERED NodeState_State = 0
)
func (NodeState_State) EnumDescriptor ¶
func (NodeState_State) EnumDescriptor() ([]byte, []int)
func (NodeState_State) String ¶
func (x NodeState_State) String() string
type NoneTemplate ¶
type NoneTemplate struct { }
func (*NoneTemplate) Descriptor ¶
func (*NoneTemplate) Descriptor() ([]byte, []int)
func (*NoneTemplate) ProtoMessage ¶
func (*NoneTemplate) ProtoMessage()
func (*NoneTemplate) Reset ¶
func (m *NoneTemplate) Reset()
func (*NoneTemplate) ResourceName ¶
func (*NoneTemplate) ResourceName() string
func (*NoneTemplate) String ¶
func (m *NoneTemplate) String() string
type NullTemplate ¶
type NullTemplate struct { Vcpu int32 `protobuf:"varint,1,opt,name=vcpu" json:"vcpu,omitempty"` MemoryGb int32 `protobuf:"varint,2,opt,name=memory_gb" json:"memory_gb,omitempty"` CrashStage NullTemplate_CrashStage `protobuf:"varint,3,opt,name=crash_stage,enum=model.NullTemplate_CrashStage" json:"crash_stage,omitempty"` NodeGroups []string `protobuf:"bytes,4,rep,name=node_groups" json:"node_groups,omitempty"` }
func (*NullTemplate) Descriptor ¶
func (*NullTemplate) Descriptor() ([]byte, []int)
func (*NullTemplate) GetCrashStage ¶
func (m *NullTemplate) GetCrashStage() NullTemplate_CrashStage
func (*NullTemplate) GetMemoryGb ¶
func (m *NullTemplate) GetMemoryGb() int32
func (*NullTemplate) GetNodeGroups ¶
func (m *NullTemplate) GetNodeGroups() []string
func (*NullTemplate) GetVcpu ¶
func (m *NullTemplate) GetVcpu() int32
func (*NullTemplate) ProtoMessage ¶
func (*NullTemplate) ProtoMessage()
func (*NullTemplate) Reset ¶
func (m *NullTemplate) Reset()
func (*NullTemplate) ResourceName ¶
func (*NullTemplate) ResourceName() string
func (*NullTemplate) String ¶
func (m *NullTemplate) String() string
type NullTemplate_CrashStage ¶
type NullTemplate_CrashStage int32
const ( NullTemplate_NONE NullTemplate_CrashStage = 0 NullTemplate_START NullTemplate_CrashStage = 1 NullTemplate_STOP NullTemplate_CrashStage = 2 NullTemplate_CREATE NullTemplate_CrashStage = 3 NullTemplate_DESTROY NullTemplate_CrashStage = 4 NullTemplate_REBOOT NullTemplate_CrashStage = 5 )
func (NullTemplate_CrashStage) EnumDescriptor ¶
func (NullTemplate_CrashStage) EnumDescriptor() ([]byte, []int)
func (NullTemplate_CrashStage) String ¶
func (x NullTemplate_CrashStage) String() string
type QemuTemplate ¶
type QemuTemplate struct { Vcpu int32 `protobuf:"varint,1,opt,name=vcpu" json:"vcpu,omitempty"` MemoryGb int32 `protobuf:"varint,2,opt,name=memory_gb" json:"memory_gb,omitempty"` MinVcpu int32 `protobuf:"varint,3,opt,name=min_vcpu" json:"min_vcpu,omitempty"` MinMemoryGb int32 `protobuf:"varint,4,opt,name=min_memory_gb" json:"min_memory_gb,omitempty"` QemuImage *QemuTemplate_Image `protobuf:"bytes,5,opt,name=qemu_image" json:"qemu_image,omitempty"` UseKvm bool `protobuf:"varint,6,opt,name=use_kvm" json:"use_kvm,omitempty"` Interfaces []*QemuTemplate_Interface `protobuf:"bytes,7,rep,name=interfaces" json:"interfaces,omitempty"` NodeGroups []string `protobuf:"bytes,8,rep,name=node_groups" json:"node_groups,omitempty"` }
func (*QemuTemplate) Descriptor ¶
func (*QemuTemplate) Descriptor() ([]byte, []int)
func (*QemuTemplate) GetInterfaces ¶
func (m *QemuTemplate) GetInterfaces() []*QemuTemplate_Interface
func (*QemuTemplate) GetMemoryGb ¶
func (m *QemuTemplate) GetMemoryGb() int32
func (*QemuTemplate) GetMinMemoryGb ¶
func (m *QemuTemplate) GetMinMemoryGb() int32
func (*QemuTemplate) GetMinVcpu ¶
func (m *QemuTemplate) GetMinVcpu() int32
func (*QemuTemplate) GetNodeGroups ¶
func (m *QemuTemplate) GetNodeGroups() []string
func (*QemuTemplate) GetQemuImage ¶
func (m *QemuTemplate) GetQemuImage() *QemuTemplate_Image
func (*QemuTemplate) GetUseKvm ¶
func (m *QemuTemplate) GetUseKvm() bool
func (*QemuTemplate) GetVcpu ¶
func (m *QemuTemplate) GetVcpu() int32
func (*QemuTemplate) ProtoMessage ¶
func (*QemuTemplate) ProtoMessage()
func (*QemuTemplate) Reset ¶
func (m *QemuTemplate) Reset()
func (*QemuTemplate) ResourceName ¶
func (*QemuTemplate) ResourceName() string
func (*QemuTemplate) String ¶
func (m *QemuTemplate) String() string
type QemuTemplate_Image ¶
type QemuTemplate_Image struct { DownloadUrl string `protobuf:"bytes,1,opt,name=download_url" json:"download_url,omitempty"` ChksumType string `protobuf:"bytes,2,opt,name=chksum_type" json:"chksum_type,omitempty"` Chksum string `protobuf:"bytes,3,opt,name=chksum" json:"chksum,omitempty"` Format QemuTemplate_Image_Format `protobuf:"varint,4,opt,name=format,enum=model.QemuTemplate_Image_Format" json:"format,omitempty"` }
func (*QemuTemplate_Image) Descriptor ¶
func (*QemuTemplate_Image) Descriptor() ([]byte, []int)
func (*QemuTemplate_Image) GetChksum ¶
func (m *QemuTemplate_Image) GetChksum() string
func (*QemuTemplate_Image) GetChksumType ¶
func (m *QemuTemplate_Image) GetChksumType() string
func (*QemuTemplate_Image) GetDownloadUrl ¶
func (m *QemuTemplate_Image) GetDownloadUrl() string
func (*QemuTemplate_Image) GetFormat ¶
func (m *QemuTemplate_Image) GetFormat() QemuTemplate_Image_Format
func (*QemuTemplate_Image) ProtoMessage ¶
func (*QemuTemplate_Image) ProtoMessage()
func (*QemuTemplate_Image) Reset ¶
func (m *QemuTemplate_Image) Reset()
func (*QemuTemplate_Image) String ¶
func (m *QemuTemplate_Image) String() string
type QemuTemplate_Image_Format ¶
type QemuTemplate_Image_Format int32
const ( QemuTemplate_Image_RAW QemuTemplate_Image_Format = 0 QemuTemplate_Image_QCOW2 QemuTemplate_Image_Format = 1 )
func (QemuTemplate_Image_Format) EnumDescriptor ¶
func (QemuTemplate_Image_Format) EnumDescriptor() ([]byte, []int)
func (QemuTemplate_Image_Format) String ¶
func (x QemuTemplate_Image_Format) String() string
type QemuTemplate_Interface ¶
type QemuTemplate_Interface struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` Macaddr string `protobuf:"bytes,2,opt,name=macaddr" json:"macaddr,omitempty"` Ipv4Addr string `protobuf:"bytes,3,opt,name=ipv4addr" json:"ipv4addr,omitempty"` // string bridge = 4; // Obsolete Ipv4Gateway string `protobuf:"bytes,5,opt,name=ipv4gateway" json:"ipv4gateway,omitempty"` }
func (*QemuTemplate_Interface) Descriptor ¶
func (*QemuTemplate_Interface) Descriptor() ([]byte, []int)
func (*QemuTemplate_Interface) GetIpv4Addr ¶
func (m *QemuTemplate_Interface) GetIpv4Addr() string
func (*QemuTemplate_Interface) GetIpv4Gateway ¶
func (m *QemuTemplate_Interface) GetIpv4Gateway() string
func (*QemuTemplate_Interface) GetMacaddr ¶
func (m *QemuTemplate_Interface) GetMacaddr() string
func (*QemuTemplate_Interface) GetType ¶
func (m *QemuTemplate_Interface) GetType() string
func (*QemuTemplate_Interface) ProtoMessage ¶
func (*QemuTemplate_Interface) ProtoMessage()
func (*QemuTemplate_Interface) Reset ¶
func (m *QemuTemplate_Interface) Reset()
func (*QemuTemplate_Interface) String ¶
func (m *QemuTemplate_Interface) String() string
type ResourceTemplate ¶
type ResourceTemplate interface { ResourceName() string // contains filtered or unexported methods }
ResourceTemplate is a marker interface for all resource template structs.
Example (Reflection) ¶
// Normal type assertion rl, ok := res1.Template.Item.(*Template_Lxc) fmt.Println(rl.Lxc, ok) // Using reflection API v := reflect.ValueOf(res1.Template.Item) fmt.Println(v.Kind()) fmt.Println(v.Type().String()) fmt.Println( "ConvertibleTo(*Template_Lxc) ->", v.Type().ConvertibleTo(reflect.TypeOf((*Template_Lxc)(nil))), ) fmt.Println( "ConvertibleTo(*Template_Null) ->", v.Type().ConvertibleTo(reflect.TypeOf((*Template_Null)(nil))), ) fieldName := strings.TrimPrefix(v.Type().String(), "*model.Template_") fmt.Println(fieldName) f := v.Elem().FieldByName(fieldName) fmt.Println(f.Type().String()) fmt.Println(f.MethodByName("ResourceName").Call([]reflect.Value{})[0])
Output: vcpu:1 memory_gb:10 lxc_image:<download_url:"http://example.com/image.raw" chksum:"1234567890abcdef" > true ptr *model.Template_Lxc ConvertibleTo(*Template_Lxc) -> true ConvertibleTo(*Template_Null) -> false Lxc *model.LxcTemplate vm/lxc
func GetResourceTemplate ¶
func GetResourceTemplate(tmpl *Template) ResourceTemplate
ResourceTemplate resolves the assigned object type of "Template" OneOf field and cast to ResourceTemplate interface. So that you can get the resource name in string.
type SchedulerNode ¶
type SchedulerNode struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at" json:"created_at,omitempty"` }
func (*SchedulerNode) Descriptor ¶
func (*SchedulerNode) Descriptor() ([]byte, []int)
func (*SchedulerNode) GetCreatedAt ¶
func (m *SchedulerNode) GetCreatedAt() *google_protobuf.Timestamp
func (*SchedulerNode) GetId ¶
func (m *SchedulerNode) GetId() string
func (*SchedulerNode) ProtoMessage ¶
func (*SchedulerNode) ProtoMessage()
func (*SchedulerNode) Reset ¶
func (m *SchedulerNode) Reset()
func (*SchedulerNode) String ¶
func (m *SchedulerNode) String() string
type Template ¶
type Template struct { TemplateUri string `protobuf:"bytes,1,opt,name=template_uri" json:"template_uri,omitempty"` // Types that are valid to be assigned to Item: // *Template_None // *Template_Lxc // *Template_Null // *Template_Qemu // *Template_Esxi Item isTemplate_Item `protobuf_oneof:"Item"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at" json:"created_at,omitempty"` }
func (*Template) Descriptor ¶
func (*Template) GetCreatedAt ¶
func (m *Template) GetCreatedAt() *google_protobuf.Timestamp
func (*Template) GetEsxi ¶
func (m *Template) GetEsxi() *EsxiTemplate
func (*Template) GetLxc ¶
func (m *Template) GetLxc() *LxcTemplate
func (*Template) GetNone ¶
func (m *Template) GetNone() *NoneTemplate
func (*Template) GetNull ¶
func (m *Template) GetNull() *NullTemplate
func (*Template) GetQemu ¶
func (m *Template) GetQemu() *QemuTemplate
func (*Template) GetTemplateUri ¶
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
func (*Template) ResourceTemplate ¶
func (t *Template) ResourceTemplate() ResourceTemplate
type Template_Esxi ¶
type Template_Esxi struct {
Esxi *EsxiTemplate `protobuf:"bytes,504,opt,name=esxi,oneof"`
}
type Template_Lxc ¶
type Template_Lxc struct {
Lxc *LxcTemplate `protobuf:"bytes,501,opt,name=lxc,oneof"`
}
type Template_None ¶
type Template_None struct {
None *NoneTemplate `protobuf:"bytes,500,opt,name=none,oneof"`
}
type Template_Null ¶
type Template_Null struct {
Null *NullTemplate `protobuf:"bytes,502,opt,name=null,oneof"`
}
type Template_Qemu ¶
type Template_Qemu struct {
Qemu *QemuTemplate `protobuf:"bytes,503,opt,name=qemu,oneof"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.