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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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