cluster

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func By

func By(master client.Client) *Builder

func (*Builder) Complete

func (b *Builder) Complete() (Interface, error)

func (*Builder) Named

func (b *Builder) Named(clusterName string) *Builder

func (*Builder) WithOptions

func (b *Builder) WithOptions(opts ...InitOptions) *Builder

func (*Builder) WithScheme

func (b *Builder) WithScheme(scheme *runtime.Scheme) *Builder

type Code

type Code int
const (
	// Disabled Indicates that the cluster is disabled.
	Disabled Code = iota
	// Stopped Indicates that the cluster is stopped.
	Stopped
	// Started Indicates that the cluster is started.
	Started
	// Waiting Indicates that waiting the cluster resource ready.
	Waiting
	// Ready Indicates that the cluster resource is already ready.
	Ready
)

func (Code) String

func (c Code) String() string

type InitOptions

type InitOptions func(Interface) error

type Interface

type Interface interface {
	Runnable
	Status
	Name() string
	Client() client.Client
	Cache() cache.Cache
	ApiExtensions() clientset.Interface
	Dynamic() dynamic.Interface
	RESTMapper() meta.RESTMapper
	Config() *rest.Config
	Discovery() discovery.DiscoveryInterface
}

func New

func New(config *rest.Config, scheme *runtime.Scheme, options ...InitOptions) (Interface, error)

New returns a new cluster or error default status code is Stopped

type Runnable

type Runnable interface {
	Start(ctx context.Context) error
	Stop()
}

type Status

type Status interface {
	Status() Code
	Disable()
}

Jump to

Keyboard shortcuts

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