orchestration

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMethodNotSupported = errors.New("Method not supported")
View Source
var ErrResourceNotSupported = errors.New("Method on resource not supported")
View Source
var ErrUnknownResource = errors.New("Unknown resource")

Functions

This section is empty.

Types

type Driver

type Driver interface {
	GetVersion() (string, string)
	SetIPAddrScope(ports map[string][]share.CLUSIPAddr, meta *container.ContainerMeta, nets map[string]*container.Network)
	GetService(meta *container.ContainerMeta) *Service
	GetPlatformRole(meta *container.ContainerMeta) (string, bool) // return platform type and if container should be secured
	GetDomain(labels map[string]string) string
	GetServiceSubnet(envs []string) *net.IPNet
	GetHostTunnelIP(links map[string]sk.NetIface) []net.IPNet
	IgnoreConnectFromManagedHost() bool
	ConsiderHostsAsInternal() bool
	ApplyPolicyAtIngress() bool
	SupportKubeCISBench() bool
	CleanupHostPorts(hostPorts map[string][]share.CLUSIPAddr) error
}

func GetDriver

func GetDriver(platform, flavor, network string, ver1, ver2 string,
	sys *system.SystemTools, rt container.Runtime,
) Driver

type ResourceDriver

type ResourceDriver interface {
	GetOEMVersion() (string, error)
	Login(username, password string) (string, string, error)
	Logout(username, token string) error
	GetAuthServerAlias() string
	GetUserRoles(username string) (map[string]string, error)
	ListUsers() []UserRBAC
	RegisterResource(rt string) error
	ListResource(rt string) ([]interface{}, error)
	StartWatchResource(rt string, wcb WatchCallback, scb StateCallback) error
	StopWatchResource(rt string) error
	StopWatchAllResources() error
	GetResource(rt, namespace, name string) (interface{}, error)
	AddResource(rt string, res interface{}) error
	UpdateResource(rt string, res interface{}) error
	DeleteResource(rt string, res interface{}) error
}

type Service

type Service struct {
	Name   string
	Domain string
}

type StateCallback

type StateCallback func(state string, err error)

type UserRBAC

type UserRBAC struct {
	Name   string
	Domain string
	RBAC   map[string]string // domain -> nv role
}

type WatchCallback

type WatchCallback func(rt string, event string, object interface{}, old interface{})

Jump to

Keyboard shortcuts

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