intent

package
v0.0.0-...-0744c93 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Pods        []Pod
	Deployments []Deployment
	// contains filtered or unexported fields
}

Cluster k8s cluster type

func (*Cluster) Build

func (c *Cluster) Build() Cluster

Build builds a k8s cluster

func (*Cluster) CreateCluster

func (c *Cluster) CreateCluster() error

func (*Cluster) SetDeployments

func (c *Cluster) SetDeployments(deployments ...Deployment) ClusterBuilder

SetDeployments sets cluster deployments

func (*Cluster) SetPods

func (c *Cluster) SetPods(pods ...Pod) ClusterBuilder

SetPods set cluster pods

type ClusterBuilder

type ClusterBuilder interface {
	SetPods(...Pod) ClusterBuilder
	SetDeployments(...Deployment) ClusterBuilder
	Build() Cluster
}

func NewCluster

func NewCluster(namespace string) ClusterBuilder

NewCluster creates a new cluster builder

type Container

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

Container container type defines an abstraction for containers

func (*Container) Args

func (c *Container) Args() []string

Args returns a container args

func (*Container) Build

func (c *Container) Build() Container

Build builds a container

func (*Container) Command

func (c *Container) Command() []string

Command returns a container command

func (*Container) Image

func (c *Container) Image() string

Image returns the name of a container image

func (*Container) Name

func (c *Container) Name() string

Name returns the name of a container

func (*Container) Ports

func (c *Container) Ports() []Port

Ports return a set of container ports

func (*Container) PullPolicy

func (c *Container) PullPolicy() string

PullPolicy returns the pull policy

func (*Container) SetArgs

func (c *Container) SetArgs(args ...string) ContainerBuilder

SetArgs sets a container arguments

func (*Container) SetCommand

func (c *Container) SetCommand(command ...string) ContainerBuilder

SetCommand sets a container command

func (*Container) SetImage

func (c *Container) SetImage(image string) ContainerBuilder

SetImage sets a container image

func (*Container) SetName

func (c *Container) SetName(name string) ContainerBuilder

SetName sets a container name

func (*Container) SetPorts

func (c *Container) SetPorts(ports ...Port) ContainerBuilder

SetPorts sets a container ports

func (*Container) SetPullPolicy

func (c *Container) SetPullPolicy(pullPolicy string) ContainerBuilder

SetPullPolicy sets pull policy for a container

type ContainerBuilder

type ContainerBuilder interface {
	SetName(string) ContainerBuilder
	SetImage(string) ContainerBuilder
	SetArgs(...string) ContainerBuilder
	SetCommand(...string) ContainerBuilder
	SetPullPolicy(string) ContainerBuilder
	SetPorts(...Port) ContainerBuilder
	Build() Container
}

ContainerBuilder container builder interface

func NewContainer

func NewContainer() ContainerBuilder

NewContainer creates a new container builder

type Deployment

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

Deployment deployment abstraction

func (*Deployment) Build

func (d *Deployment) Build() Deployment

Build builds a deployment

func (*Deployment) Labels

func (d *Deployment) Labels() map[string]string

Labels return deployment labels

func (*Deployment) Name

func (d *Deployment) Name() string

Name returns the name of a deployment

func (*Deployment) Pod

func (d *Deployment) Pod() Pod

Pods returns deployment pod

func (*Deployment) Replicas

func (d *Deployment) Replicas() int32

Replicas returns the number of deployment replicas

func (*Deployment) SetLabels

func (d *Deployment) SetLabels(labels map[string]string) DeploymentBuilder

SetLabels sets the labels for the service

func (*Deployment) SetName

func (d *Deployment) SetName(name string) DeploymentBuilder

SetName sets a deployment name

func (*Deployment) SetPods

func (d *Deployment) SetPods(pod Pod) DeploymentBuilder

SetPods sets deployment pod

func (*Deployment) SetReplicas

func (d *Deployment) SetReplicas(replicas int32) DeploymentBuilder

SetReplicas sets deployment replicas

type DeploymentBuilder

type DeploymentBuilder interface {
	SetName(string) DeploymentBuilder
	SetPods(Pod) DeploymentBuilder
	SetReplicas(int32) DeploymentBuilder
	SetLabels(map[string]string) DeploymentBuilder
	Build() Deployment
}

func NewDeployment

func NewDeployment() DeploymentBuilder

NewDeployment creates a new deployment

type Pod

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

Pod defines a pod object

func (*Pod) Build

func (p *Pod) Build() Pod

func (*Pod) SetContainers

func (p *Pod) SetContainers(containers ...Container) PodBuilder

func (*Pod) SetName

func (p *Pod) SetName(name string) PodBuilder

type PodBuilder

type PodBuilder interface {
	SetName(string) PodBuilder
	SetContainers(...Container) PodBuilder
	Build() Pod
}

PodBuilder pod builder interface

func NewPod

func NewPod() PodBuilder

New creates a new pod builder

type Port

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

Port port abstraction

type PullPolicy

type PullPolicy int

PullPolicy pull policy type

const (
	Always PullPolicy = iota
	IfNotPresent
	Never
)

func (PullPolicy) String

func (p PullPolicy) String() string

type ServiceBuilder

type ServiceBuilder interface {
}

Jump to

Keyboard shortcuts

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