providers

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MPL-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClusterDriverNotImplemented = errors.New("driver not implemented")
	ErrClusterExists               = errors.New("cluster exists")
)

Functions

This section is empty.

Types

type CertificateCA

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

func NewCertificateCA

func NewCertificateCA(co *resources.CertificateCA, l hclog.Logger) *CertificateCA

func (*CertificateCA) Create

func (c *CertificateCA) Create() error

func (*CertificateCA) Destroy

func (c *CertificateCA) Destroy() error

func (*CertificateCA) Lookup

func (c *CertificateCA) Lookup() ([]string, error)

type CertificateLeaf

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

func NewCertificateLeaf

func NewCertificateLeaf(co *resources.CertificateLeaf, l hclog.Logger) *CertificateLeaf

func (*CertificateLeaf) Create

func (c *CertificateLeaf) Create() error

func (*CertificateLeaf) Destroy

func (c *CertificateLeaf) Destroy() error

func (*CertificateLeaf) Lookup

func (c *CertificateLeaf) Lookup() ([]string, error)

type ConfigWrapper

type ConfigWrapper struct {
	Type  string
	Value interface{}
}

ConfigWrapper alows the provider config to be deserialized to a type

type Container

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

Container is a provider for creating and destroying Docker containers

func NewContainer

NewContainer creates a new container with the given config and Docker client

func (*Container) Create

func (c *Container) Create() error

Create implements provider method and creates a Docker container with the given config

func (*Container) Destroy

func (c *Container) Destroy() error

Destroy stops and removes the container

func (*Container) Lookup

func (c *Container) Lookup() ([]string, error)

Lookup the ID based on the config

type Copy

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

func NewCopy

func NewCopy(co *resources.Copy, l hclog.Logger) *Copy

func (*Copy) Create

func (c *Copy) Create() error

func (*Copy) Destroy

func (c *Copy) Destroy() error

func (*Copy) Lookup

func (c *Copy) Lookup() ([]string, error)

type Docs

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

Docs defines a provider for creating documentation containers

func NewDocs

func NewDocs(c *resources.Docs, cc clients.ContainerTasks, l hclog.Logger) *Docs

NewDocs creates a new Docs provider

func (*Docs) Create

func (i *Docs) Create() error

Create a new documentation container

func (*Docs) Destroy

func (i *Docs) Destroy() error

Destroy the documentation container

func (*Docs) Lookup

func (i *Docs) Lookup() ([]string, error)

Lookup the ID of the documentation container

type Helm

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

func NewHelm

NewHelm creates a new Helm provider

func (*Helm) Create

func (h *Helm) Create() error

Create implements the provider Create method

func (*Helm) Destroy

func (h *Helm) Destroy() error

Destroy implements the provider Destroy method

func (*Helm) Lookup

func (h *Helm) Lookup() ([]string, error)

Lookup implements the provider Lookup method

type ImageCache

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

func NewImageCache

func NewImageCache(co *resources.ImageCache, cl clients.ContainerTasks, hc clients.HTTP, l hclog.Logger) *ImageCache

NewContainer creates a new container with the given config and Docker client

func (*ImageCache) Create

func (c *ImageCache) Create() error

func (*ImageCache) Destroy

func (c *ImageCache) Destroy() error

func (*ImageCache) Lookup

func (c *ImageCache) Lookup() ([]string, error)

type Ingress

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

Ingress defines a provider for handling connection ingress for a cluster

func NewIngress

NewIngress creates a new ingress provider

func (*Ingress) Create

func (c *Ingress) Create() error

func (*Ingress) Destroy

func (c *Ingress) Destroy() error

Destroy satisfies the interface method but is not implemented by LocalExec

func (*Ingress) Lookup

func (c *Ingress) Lookup() ([]string, error)

Lookup satisfies the interface method but is not implemented by LocalExec

type K8sCluster

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

K8sCluster defines a provider which can create Kubernetes clusters

func NewK8sCluster

func NewK8sCluster(c *resources.K8sCluster, cc clients.ContainerTasks, kc clients.Kubernetes, hc clients.HTTP, co clients.Connector, l hclog.Logger) *K8sCluster

NewK8sCluster creates a new Kubernetes cluster provider

func (*K8sCluster) Create

func (c *K8sCluster) Create() error

Create implements interface method to create a cluster of the specified type

func (*K8sCluster) Destroy

func (c *K8sCluster) Destroy() error

Destroy implements interface method to destroy a cluster

func (*K8sCluster) ImportLocalDockerImages

func (c *K8sCluster) ImportLocalDockerImages(name string, id string, images []resources.Image, force bool) error

ImportLocalDockerImages fetches Docker images stored on the local client and imports them into the cluster

func (*K8sCluster) Lookup

func (c *K8sCluster) Lookup() ([]string, error)

Lookup the a clusters current state

type K8sConfig

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

func NewK8sConfig

func NewK8sConfig(c *resources.K8sConfig, kc clients.Kubernetes, l hclog.Logger) *K8sConfig

NewK8sConfig creates a provider which can create and destroy kubernetes configuration

func (*K8sConfig) Create

func (c *K8sConfig) Create() error

Create the Kubernetes resources defined by the config

func (*K8sConfig) Destroy

func (c *K8sConfig) Destroy() error

Destroy the Kubernetes resources defined by the config

func (*K8sConfig) Lookup

func (c *K8sConfig) Lookup() ([]string, error)

Lookup the Kubernetes resources defined by the config

type LocalExec

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

ExecLocal provider allows the execution of arbitrary commands on the local machine

func NewLocalExec

func NewLocalExec(c *resources.LocalExec, ex clients.Command, l hclog.Logger) *LocalExec

NewExecLocal creates a new Local Exec provider

func (*LocalExec) Create

func (c *LocalExec) Create() error

Create a new exec

func (*LocalExec) Destroy

func (c *LocalExec) Destroy() error

Destroy statisfies the interface method but is not implemented by LocalExec

func (*LocalExec) Lookup

func (c *LocalExec) Lookup() ([]string, error)

Lookup statisfies the interface method but is not implemented by LocalExec

type Network

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

Network is a provider for creating docker networks

func NewNetwork

func NewNetwork(co *resources.Network, cl clients.Docker, l hclog.Logger) *Network

NewNetwork creates a new network with the given config and Docker client

func (*Network) Create

func (n *Network) Create() error

Create implements the provider interface method for creating new networks

func (*Network) Destroy

func (n *Network) Destroy() error

Destroy implements the provider interface method for destroying networks

func (*Network) Lookup

func (n *Network) Lookup() ([]string, error)

Lookup the ID for a network

type NomadCluster

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

NomadCluster defines a provider which can create Kubernetes clusters

func NewNomadCluster

func NewNomadCluster(c *resources.NomadCluster, cc clients.ContainerTasks, hc clients.Nomad, con clients.Connector, l hclog.Logger) *NomadCluster

NewNomadCluster creates a new Nomad cluster provider

func (*NomadCluster) Create

func (c *NomadCluster) Create() error

Create implements interface method to create a cluster of the specified type

func (*NomadCluster) Destroy

func (c *NomadCluster) Destroy() error

Destroy implements interface method to destroy a cluster

func (*NomadCluster) ImportLocalDockerImages

func (c *NomadCluster) ImportLocalDockerImages(name string, id string, images []resources.Image, force bool) error

ImportLocalDockerImages fetches Docker images stored on the local client and imports them into the cluster

func (*NomadCluster) Lookup

func (c *NomadCluster) Lookup() ([]string, error)

Lookup the a clusters current state

type NomadJob

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

NomadJob is a provider which enabled the creation and destruction of Nomad jobs

func NewNomadJob

func NewNomadJob(c *resources.NomadJob, hc clients.Nomad, l hclog.Logger) *NomadJob

NewNomadJob creates a provider which can create and destroy Nomad jobs

func (*NomadJob) Create

func (n *NomadJob) Create() error

Create the Nomad jobs defined by the config

func (*NomadJob) Destroy

func (n *NomadJob) Destroy() error

Destroy the Nomad jobs defined by the config

func (*NomadJob) Lookup

func (n *NomadJob) Lookup() ([]string, error)

Lookup the Nomad jobs defined by the config

type Null

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

Null is a noop provider

func NewNull

func NewNull(c types.Resource, l hclog.Logger) *Null

NewNull creates a null noop provider

func (*Null) Create

func (n *Null) Create() error

func (*Null) Destroy

func (n *Null) Destroy() error

func (*Null) Lookup

func (n *Null) Lookup() ([]string, error)

type Provider

type Provider interface {
	Create() error
	Destroy() error
	Lookup() ([]string, error)
}

Provider defines an interface to be implemented by providers

type RemoteExec

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

ExecRemote provider allows the execution of arbitrary commands on an existing target or can create a new container before running

func NewRemoteExec

NewRemoteExec creates a new Exec provider

func (*RemoteExec) Create

func (c *RemoteExec) Create() error

Create a new execution instance

func (*RemoteExec) Destroy

func (c *RemoteExec) Destroy() error

Destroy statisfies the interface requirements but is not used as the resource is not persistent

func (*RemoteExec) Lookup

func (c *RemoteExec) Lookup() ([]string, error)

Lookup statisfies the interface requirements but is not used as the resource is not persistent

type Template

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

Template provider allows parsing and output of file based templates

func NewTemplate

func NewTemplate(c *resources.Template, l hclog.Logger) *Template

NewTemplate creates a new Local Exec provider

func (*Template) Create

func (c *Template) Create() error

Create a new template

func (*Template) Destroy

func (c *Template) Destroy() error

func (*Template) Lookup

func (c *Template) Lookup() ([]string, error)

Lookup satisfies the interface method but is not implemented by Template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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