proto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeState_name = map[int32]string{
		0: "UNKNOWN",
		1: "INITIALIZED",
		2: "PENDING",
		3: "RUNNING",
		4: "TAINTED",
		5: "DOWN",
	}
	NodeState_value = map[string]int32{
		"UNKNOWN":     0,
		"INITIALIZED": 1,
		"PENDING":     2,
		"RUNNING":     3,
		"TAINTED":     4,
		"DOWN":        5,
	}
)

Enum value maps for NodeState.

View Source
var (
	EvaluationState_name = map[int32]string{
		0: "CREATED",
		1: "UPDATED",
		2: "DELETED",
	}
	EvaluationState_value = map[string]int32{
		"CREATED": 0,
		"UPDATED": 1,
		"DELETED": 2,
	}
)

Enum value maps for EvaluationState.

View Source
var File_operator_proto_structs_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name      string  `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace string  `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	Nodes     []*Node `protobuf:"bytes,3,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*Cluster) AddNode

func (c *Cluster) AddNode(n *Node)

func (*Cluster) Copy

func (c *Cluster) Copy() *Cluster

func (*Cluster) DelNodeAtIndx

func (c *Cluster) DelNodeAtIndx(i int)

func (*Cluster) Descriptor deprecated

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

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetName

func (x *Cluster) GetName() string

func (*Cluster) GetNamespace

func (x *Cluster) GetNamespace() string

func (*Cluster) GetNodes

func (x *Cluster) GetNodes() []*Node

func (*Cluster) NewNode

func (c *Cluster) NewNode() *Node

func (*Cluster) NodeAtIndex

func (c *Cluster) NodeAtIndex(ID string) int

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) ProtoReflect

func (x *Cluster) ProtoReflect() protoreflect.Message

func (*Cluster) Reset

func (x *Cluster) Reset()

func (*Cluster) Size

func (c *Cluster) Size() int

func (*Cluster) String

func (x *Cluster) String() string

type Evaluation

type Evaluation struct {
	Generation      int64  `protobuf:"varint,1,opt,name=Generation,proto3" json:"Generation,omitempty"`
	ResourceVersion string `protobuf:"bytes,2,opt,name=ResourceVersion,proto3" json:"ResourceVersion,omitempty"`
	// Name of the instance object (either cluster or resource)
	Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	// Name of the resource being created (if any)
	Resource string `protobuf:"bytes,4,opt,name=Resource,proto3" json:"Resource,omitempty"`
	// Name of the cluster (if its a resource)
	Cluster string `protobuf:"bytes,5,opt,name=Cluster,proto3" json:"Cluster,omitempty"`
	// Name of the backend/database
	Backend string `protobuf:"bytes,6,opt,name=Backend,proto3" json:"Backend,omitempty"`
	// JSON string of the specification
	Spec string `protobuf:"bytes,7,opt,name=Spec,proto3" json:"Spec,omitempty"`
	// JSON string of the status
	Status    string          `protobuf:"bytes,8,opt,name=Status,proto3" json:"Status,omitempty"`
	State     EvaluationState `protobuf:"varint,9,opt,name=State,proto3,enum=proto.EvaluationState" json:"State,omitempty"`
	Namespace string          `protobuf:"bytes,10,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	IsDeleted bool            `protobuf:"varint,11,opt,name=IsDeleted,proto3" json:"IsDeleted,omitempty"`
	// contains filtered or unexported fields
}

func (*Evaluation) Descriptor deprecated

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

Deprecated: Use Evaluation.ProtoReflect.Descriptor instead.

func (*Evaluation) GetBackend

func (x *Evaluation) GetBackend() string

func (*Evaluation) GetCluster

func (x *Evaluation) GetCluster() string

func (*Evaluation) GetGeneration

func (x *Evaluation) GetGeneration() int64

func (*Evaluation) GetIsDeleted

func (x *Evaluation) GetIsDeleted() bool

func (*Evaluation) GetName

func (x *Evaluation) GetName() string

func (*Evaluation) GetNamespace

func (x *Evaluation) GetNamespace() string

func (*Evaluation) GetResource

func (x *Evaluation) GetResource() string

func (*Evaluation) GetResourceVersion

func (x *Evaluation) GetResourceVersion() string

func (*Evaluation) GetSpec

func (x *Evaluation) GetSpec() string

func (*Evaluation) GetState

func (x *Evaluation) GetState() EvaluationState

func (*Evaluation) GetStatus

func (x *Evaluation) GetStatus() string

func (*Evaluation) ProtoMessage

func (*Evaluation) ProtoMessage()

func (*Evaluation) ProtoReflect

func (x *Evaluation) ProtoReflect() protoreflect.Message

func (*Evaluation) Reset

func (x *Evaluation) Reset()

func (*Evaluation) String

func (x *Evaluation) String() string

type EvaluationState

type EvaluationState int32
const (
	EvaluationState_CREATED EvaluationState = 0
	EvaluationState_UPDATED EvaluationState = 1
	EvaluationState_DELETED EvaluationState = 2
)

func (EvaluationState) Descriptor

func (EvaluationState) Enum

func (x EvaluationState) Enum() *EvaluationState

func (EvaluationState) EnumDescriptor deprecated

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

Deprecated: Use EvaluationState.Descriptor instead.

func (EvaluationState) Number

func (EvaluationState) String

func (x EvaluationState) String() string

func (EvaluationState) Type

type Mount

type Mount struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*Mount) Copy

func (m *Mount) Copy() *Mount

func (*Mount) Descriptor deprecated

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

Deprecated: Use Mount.ProtoReflect.Descriptor instead.

func (*Mount) GetId

func (x *Mount) GetId() string

func (*Mount) GetName

func (x *Mount) GetName() string

func (*Mount) GetPath

func (x *Mount) GetPath() string

func (*Mount) ProtoMessage

func (*Mount) ProtoMessage()

func (*Mount) ProtoReflect

func (x *Mount) ProtoReflect() protoreflect.Message

func (*Mount) Reset

func (x *Mount) Reset()

func (*Mount) String

func (x *Mount) String() string

type Node

type Node struct {
	ID              string            `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Addr            string            `protobuf:"bytes,2,opt,name=Addr,proto3" json:"Addr,omitempty"`
	Handle          string            `protobuf:"bytes,3,opt,name=Handle,proto3" json:"Handle,omitempty"`
	Namespace       string            `protobuf:"bytes,4,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	Nodeset         string            `protobuf:"bytes,5,opt,name=Nodeset,proto3" json:"Nodeset,omitempty"`
	Nodetype        string            `protobuf:"bytes,6,opt,name=Nodetype,proto3" json:"Nodetype,omitempty"`
	State           NodeState         `protobuf:"varint,7,opt,name=State,proto3,enum=proto.NodeState" json:"State,omitempty"`
	Cluster         string            `protobuf:"bytes,8,opt,name=Cluster,proto3" json:"Cluster,omitempty"`
	Spec            *NodeSpec         `protobuf:"bytes,9,opt,name=Spec,proto3" json:"Spec,omitempty"`
	KV              map[string]string `` /* 146-byte string literal not displayed */
	Mounts          []*Mount          `protobuf:"bytes,11,rep,name=Mounts,proto3" json:"Mounts,omitempty"`
	ResourceVersion string            `protobuf:"bytes,12,opt,name=ResourceVersion,proto3" json:"ResourceVersion,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Copy

func (n *Node) Copy() *Node

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) Equal

func (n *Node) Equal(nn *Node) bool

func (*Node) FullName

func (n *Node) FullName() string

func (*Node) Get

func (n *Node) Get(k string) string

func (*Node) GetAddr

func (x *Node) GetAddr() string

func (*Node) GetCluster

func (x *Node) GetCluster() string

func (*Node) GetHandle

func (x *Node) GetHandle() string

func (*Node) GetID

func (x *Node) GetID() string

func (*Node) GetKV

func (x *Node) GetKV() map[string]string

func (*Node) GetMounts

func (x *Node) GetMounts() []*Mount

func (*Node) GetNamespace

func (x *Node) GetNamespace() string

func (*Node) GetNodeset

func (x *Node) GetNodeset() string

func (*Node) GetNodetype

func (x *Node) GetNodetype() string

func (*Node) GetOk

func (n *Node) GetOk(k string) (string, bool)

func (*Node) GetResourceVersion

func (x *Node) GetResourceVersion() string

func (*Node) GetSpec

func (x *Node) GetSpec() *NodeSpec

func (*Node) GetState

func (x *Node) GetState() NodeState

func (*Node) Marshal

func (n *Node) Marshal() ([]byte, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) Set

func (n *Node) Set(k, v string)

func (*Node) String

func (x *Node) String() string

func (*Node) Unmarshal

func (n *Node) Unmarshal(src []byte) error

TODO: Use protobuf for this

type NodeSpec

type NodeSpec struct {
	Env     map[string]string `` /* 147-byte string literal not displayed */
	Files   map[string]string `` /* 151-byte string literal not displayed */
	Image   string            `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
	Version string            `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	Cmd     []string          `protobuf:"bytes,5,rep,name=cmd,proto3" json:"cmd,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeSpec) AddEnv

func (b *NodeSpec) AddEnv(k, v string)

func (*NodeSpec) AddEnvList

func (b *NodeSpec) AddEnvList(l []string)

func (*NodeSpec) AddEnvMap

func (b *NodeSpec) AddEnvMap(m map[string]string)

func (*NodeSpec) AddFile

func (b *NodeSpec) AddFile(path string, content string)

func (*NodeSpec) Copy

func (b *NodeSpec) Copy() *NodeSpec

func (*NodeSpec) Descriptor deprecated

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

Deprecated: Use NodeSpec.ProtoReflect.Descriptor instead.

func (*NodeSpec) GetCmd

func (x *NodeSpec) GetCmd() []string

func (*NodeSpec) GetEnv

func (x *NodeSpec) GetEnv() map[string]string

func (*NodeSpec) GetFiles

func (x *NodeSpec) GetFiles() map[string]string

func (*NodeSpec) GetImage

func (x *NodeSpec) GetImage() string

func (*NodeSpec) GetVersion

func (x *NodeSpec) GetVersion() string

func (*NodeSpec) ProtoMessage

func (*NodeSpec) ProtoMessage()

func (*NodeSpec) ProtoReflect

func (x *NodeSpec) ProtoReflect() protoreflect.Message

func (*NodeSpec) Reset

func (x *NodeSpec) Reset()

func (*NodeSpec) String

func (x *NodeSpec) String() string

type NodeState

type NodeState int32
const (
	NodeState_UNKNOWN     NodeState = 0
	NodeState_INITIALIZED NodeState = 1
	NodeState_PENDING     NodeState = 2
	NodeState_RUNNING     NodeState = 3
	NodeState_TAINTED     NodeState = 4
	NodeState_DOWN        NodeState = 5
)

func (NodeState) Descriptor

func (NodeState) Descriptor() protoreflect.EnumDescriptor

func (NodeState) Enum

func (x NodeState) Enum() *NodeState

func (NodeState) EnumDescriptor deprecated

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

Deprecated: Use NodeState.Descriptor instead.

func (NodeState) Number

func (x NodeState) Number() protoreflect.EnumNumber

func (NodeState) String

func (x NodeState) String() string

func (NodeState) Type

type Nodeset

type Nodeset struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Replicas int64  `protobuf:"varint,2,opt,name=replicas,proto3" json:"replicas,omitempty"`
	Config   string `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*Nodeset) Descriptor deprecated

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

Deprecated: Use Nodeset.ProtoReflect.Descriptor instead.

func (*Nodeset) GetConfig

func (x *Nodeset) GetConfig() string

func (*Nodeset) GetName

func (x *Nodeset) GetName() string

func (*Nodeset) GetReplicas

func (x *Nodeset) GetReplicas() int64

func (*Nodeset) GetResource

func (x *Nodeset) GetResource() string

func (*Nodeset) ProtoMessage

func (*Nodeset) ProtoMessage()

func (*Nodeset) ProtoReflect

func (x *Nodeset) ProtoReflect() protoreflect.Message

func (*Nodeset) Reset

func (x *Nodeset) Reset()

func (*Nodeset) String

func (x *Nodeset) String() string

type Plan

type Plan struct {
	Bootstrap   bool     `protobuf:"varint,1,opt,name=Bootstrap,proto3" json:"Bootstrap,omitempty"`
	AddNodes    []*Node  `protobuf:"bytes,2,rep,name=AddNodes,proto3" json:"AddNodes,omitempty"`
	DelNodesNum int64    `protobuf:"varint,3,opt,name=DelNodesNum,proto3" json:"DelNodesNum,omitempty"`
	DelNodes    []string `protobuf:"bytes,4,rep,name=DelNodes,proto3" json:"DelNodes,omitempty"`
	UpdateNodes []string `protobuf:"bytes,5,rep,name=UpdateNodes,proto3" json:"UpdateNodes,omitempty"`
	Cluster     *Cluster `protobuf:"bytes,6,opt,name=Cluster,proto3" json:"Cluster,omitempty"`
	// contains filtered or unexported fields
}

func (*Plan) Add

func (p *Plan) Add(n *Node)

func (*Plan) Descriptor deprecated

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

Deprecated: Use Plan.ProtoReflect.Descriptor instead.

func (*Plan) GetAddNodes

func (x *Plan) GetAddNodes() []*Node

func (*Plan) GetBootstrap

func (x *Plan) GetBootstrap() bool

func (*Plan) GetCluster

func (x *Plan) GetCluster() *Cluster

func (*Plan) GetDelNodes

func (x *Plan) GetDelNodes() []string

func (*Plan) GetDelNodesNum

func (x *Plan) GetDelNodesNum() int64

func (*Plan) GetUpdateNodes

func (x *Plan) GetUpdateNodes() []string

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) ProtoReflect

func (x *Plan) ProtoReflect() protoreflect.Message

func (*Plan) Reset

func (x *Plan) Reset()

func (*Plan) String

func (x *Plan) String() string

type Resource

type Resource struct {
	ID         string      `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Evaluation *Evaluation `protobuf:"bytes,2,opt,name=Evaluation,proto3" json:"Evaluation,omitempty"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetEvaluation

func (x *Resource) GetEvaluation() *Evaluation

func (*Resource) GetID

func (x *Resource) GetID() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Snapshot

type Snapshot struct {
	Cluster   *Cluster    `protobuf:"bytes,1,opt,name=Cluster,proto3" json:"Cluster,omitempty"`
	Resources []*Resource `protobuf:"bytes,2,rep,name=Resources,proto3" json:"Resources,omitempty"`
	// contains filtered or unexported fields
}

func (*Snapshot) Descriptor deprecated

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

Deprecated: Use Snapshot.ProtoReflect.Descriptor instead.

func (*Snapshot) GetCluster

func (x *Snapshot) GetCluster() *Cluster

func (*Snapshot) GetResources

func (x *Snapshot) GetResources() []*Resource

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) ProtoReflect

func (x *Snapshot) ProtoReflect() protoreflect.Message

func (*Snapshot) Reset

func (x *Snapshot) Reset()

func (*Snapshot) String

func (x *Snapshot) String() string

type Task

type Task struct {
	ID         string               `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Timestamp  *timestamp.Timestamp `protobuf:"bytes,6,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Evaluation *Evaluation          `protobuf:"bytes,8,opt,name=Evaluation,proto3" json:"Evaluation,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetEvaluation

func (x *Task) GetEvaluation() *Evaluation

func (*Task) GetID

func (x *Task) GetID() string

func (*Task) GetTimestamp

func (x *Task) GetTimestamp() *timestamp.Timestamp

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

func (*Task) Time

func (t *Task) Time() (time.Time, error)

type XX

type XX struct {
	Replicas int64
	Config   string
	Resource string
}

Jump to

Keyboard shortcuts

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