types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package types provides reusable structs and interfaces used across libflexkube, which can also be used by external projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate string

Certificate is a wrapper on string type, which parses it's content as X.509 certificate while unmarshalling. This allows to validate the data during unmarshalling process.

func (*Certificate) Pick added in v0.3.0

func (c *Certificate) Pick(values ...Certificate) Certificate

Pick returns first non-empty certificate.

func (*Certificate) UnmarshalJSON

func (c *Certificate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler interface.

type PrivateKey

type PrivateKey string

PrivateKey is a wrapper on string type, which parses it's content as private key while unmarshalling. This allows to validate the data during unmarshalling process.

func (*PrivateKey) Pick added in v0.3.0

func (p *PrivateKey) Pick(values ...PrivateKey) PrivateKey

Pick returns first non-empty private key.

func (*PrivateKey) UnmarshalJSON

func (p *PrivateKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler interface.

type Resource

type Resource interface {
	StateToYaml() ([]byte, error)
	CheckCurrentState() error
	Deploy() error
	Containers() container.ContainersInterface
}

Resource interface defines flexkube resource like kubelet pool or static controlplane.

func ResourceFromYaml

func ResourceFromYaml(c []byte, r ResourceConfig) (Resource, error)

ResourceFromYaml allows to create any resource instance from YAML configuration.

type ResourceConfig

type ResourceConfig interface {
	New() (Resource, error)
	Validate() error
}

ResourceConfig interface defines flexkube resource configuration functionality.

Jump to

Keyboard shortcuts

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