Documentation ¶
Overview ¶
Package cluster impl cluster API
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidAction Illegal clusterevent action ErrInvalidAction = errors.New("invalid cluster event action") // ErrInvalidClusterType Illegal cluster type ErrInvalidClusterType = errors.New("invalid cluster type") // ErrEmptyClusterName cluster name is empty ErrEmptyClusterName = errors.New("empty cluster name") // ErrClusterAddrNotSet cluster addr not setting ErrClusterAddrNotSet = errors.New("cluster addr not set") )
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface {
Hook(event *apistructs.ClusterEvent) error
}
Cluster clusterimpl interface
func NewClusterImpl ¶
NewClusterImpl create ClusterImpl
type ClusterImpl ¶
type ClusterImpl struct {
// contains filtered or unexported fields
}
ClusterImpl Cluster interface implement
func (*ClusterImpl) Hook ¶
func (c *ClusterImpl) Hook(clusterEvent *apistructs.ClusterEvent) error
Hook receive clusterevent, reference `apistructs.ClusterEvent`
type ClusterInfo ¶
type ClusterInfo struct { // cluster name, e.g. "terminus-y" ClusterName string `json:"clusterName,omitempty"` // executor name, e.g. MARATHONFORTERMINUS ExecutorName string `json:"name,omitempty"` // executor type,e.g. MARATHON, METRONOME, K8S, EDAS Kind string `json:"kind,omitempty"` // options can include the following //"ADDR": "master.mesos/service/marathon", //"PREFIX": "/runtimes/v1", //"VERSION":"1.6.0", //"PUBLICIPGROUP":"external", //"ENABLETAG":"true", //"PRESERVEPROJECTS":"58" //"CA_CRT" //"CLIENT_CRT" //"CLIENT_KEY" Options map[string]string `json:"options,omitempty"` OptionsPlus *executorconfig.OptPlus `json:"optionsPlus,omitempty"` }
ClusterInfo Cluster information, different from apistructs.ClusterInfo, this structure is used internally by cluster pkg
Click to show internal directories.
Click to hide internal directories.