cluster

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0, MIT Imports: 14 Imported by: 17

Documentation

Index

Constants

View Source
const CLUSTERID_GROUP = "gardener.cloud"
View Source
const DEFAULT = "default"
View Source
const SUBOPTION_DISABLE_DEPLOY_CRDS = ".disable-deploy-crds"
View Source
const SUBOPTION_ID = ".id"

Variables

This section is empty.

Functions

func Canonical

func Canonical(names []string) []string

func MustRegister

func MustRegister(name string, option string, short string)

func NewClusters

func NewClusters() *_Clusters

func Register

func Register(name string, option string, short string) error

func RegisterExtension

func RegisterExtension(e Extension)

Types

type Clusters

type Clusters interface {
	GetCluster(name string) Interface
	GetById(id string) Interface
	GetClusters(name ...string) (Clusters, error)

	GetEffective(name string) Interface
	GetAliases(name string) utils.StringSet

	GetObject(key resources.ClusterObjectKey) (resources.Object, error)
	GetCachedObject(key resources.ClusterObjectKey) (resources.Object, error)

	String() string
}

func CreateClustersFromDefaults

func CreateClustersFromDefaults(ctx context.Context, logger logger.LogContext, cfg *config.Config, names utils.StringSet) (Clusters, error)

type Configuration

type Configuration struct {
	// contains filtered or unexported fields
}

func Configure

func Configure(name string, option string, short string) Configuration

func (Configuration) Definition

func (this Configuration) Definition() Definition

func (Configuration) Fallback

func (this Configuration) Fallback(name string) Configuration

func (Configuration) MustRegister

func (this Configuration) MustRegister() Configuration

func (Configuration) MustRegisterAt

func (this Configuration) MustRegisterAt(registry Registry) Configuration

func (Configuration) Register

func (this Configuration) Register() error

func (Configuration) RegisterAt

func (this Configuration) RegisterAt(registry Registry) error

type Definition

type Definition interface {
	Name() string
	Description() string
	ConfigOptionName() string
	Fallback() string
}

type Definitions

type Definitions interface {
	Get(name string) Definition
	CreateClusters(ctx context.Context, logger logger.LogContext, cfg *config.Config, names utils.StringSet) (Clusters, error)
	ExtendConfig(cfg *config.Config)
	GetScheme() *runtime.Scheme
}

func DefaultDefinitions

func DefaultDefinitions() Definitions

type Extension

type Extension interface {
	ExtendConfig(def Definition, cfg *config.Config)
	Extend(cluster Interface, config *config.Config) error
}

type Interface

type Interface interface {
	GetName() string
	GetId() string
	GetServerVersion() *semver.Version
	GetAttr(key interface{}) interface{}
	SetAttr(key, value interface{})
	GetObject(interface{}) (resources.Object, error)
	GetObjectInto(resources.ObjectName, resources.ObjectData) (resources.Object, error)
	GetCachedObject(interface{}) (resources.Object, error)
	GetResource(groupKind schema.GroupKind) (resources.Interface, error)
	Config() restclient.Config
	Resources() resources.Resources
	ResourceContext() resources.ResourceContext
	IsLocal() bool
	Definition() Definition

	resources.ClusterSource
}

func CreateCluster

func CreateCluster(ctx context.Context, logger logger.LogContext, req Definition, id string, kubeconfig string) (Interface, error)

type Registerable

type Registerable interface {
	Definition() Definition
}

type RegistrationInterface

type RegistrationInterface interface {
	RegisterCluster(Registerable) error
	MustRegisterCluster(Registerable) RegistrationInterface
}

type Registrations

type Registrations map[string]Definition

type Registry

type Registry interface {
	RegistrationInterface
	GetDefinitions() Definitions
}

func DefaultRegistry

func DefaultRegistry() Registry

func NewRegistry

func NewRegistry(scheme *runtime.Scheme) Registry

Jump to

Keyboard shortcuts

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