mappings

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const CLUSTER_MAIN = "<MAIN>"
View Source
const TYPE_CONTROLLER = "controller"
View Source
const TYPE_GROUP = "group"

Variables

This section is empty.

Functions

func ClusterName

func ClusterName(name string) string

func Configure

func Configure() empty

func DetermineClusters

func DetermineClusters(cdefs cluster.Definitions, cmp Definition, names ...string) (utils.StringSet, []string, error)

func MapCluster

func MapCluster(main bool, name string, cmp Definition) (mapped, info string)

func MapClusters

func MapClusters(clusters cluster.Clusters, cmp Definition, names ...string) (cluster.Clusters, error)

func Register

func Register(reg Registerable) error

Types

type Configuration

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

func ForController

func ForController(name string) Configuration

func ForControllerGroup

func ForControllerGroup(name string) Configuration

func (Configuration) Definition

func (this Configuration) Definition() Definition

func (Configuration) Map

func (this Configuration) Map(cluster, to 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 {
	Type() string
	Name() string
	MapCluster(name string) string
	MapInfo(name string) string
	MappedClusters() utils.StringSet
	String() string
}

type Definitions

type Definitions interface {
	Get(mtype, name string) Definition
	GetEffective(name string, grps groups.Definitions) (Definition, error)
}

func DefaultDefinitions

func DefaultDefinitions() Definitions

type Registerable

type Registerable interface {
	Definition() Definition
}

type RegistrationInterface

type RegistrationInterface interface {
	RegisterMapping(Registerable) error
	MustRegisterMapping(Registerable) RegistrationInterface
}

func MustRegister

func MustRegister(reg Registerable) RegistrationInterface

type Registry

type Registry interface {
	RegistrationInterface
	GetDefinitions() Definitions
}

func DefaultRegistry

func DefaultRegistry() Registry

func NewRegistry

func NewRegistry() Registry

Jump to

Keyboard shortcuts

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