cluster

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

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

func NewClusterImpl(js jsonstore.JsonStore) Cluster

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

Directories

Path Synopsis
Package clusterutil cluster utils
Package clusterutil cluster utils

Jump to

Keyboard shortcuts

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