resource

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package resource stores a wrapper over container.Containers, which implements types.Resource interface. It is stored in separate package to avoid cyclic imports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Containers

type Containers struct {
	// State holds containers state.
	State container.ContainersState `json:"state,omitempty"`

	// Containers stores user-provider containers to create.
	Containers container.ContainersState `json:"containers,omitempty"`
}

Containers is a wrapper over container.Containers, which implemens types.ResourceConfig and also has JSON field tags the same as other resources.

It allows to orchestrate and update multiple containers spread across multiple hosts and update their configurations.

func (*Containers) New

func (c *Containers) New() (types.Resource, error)

New creates new containers instance, but returns generic types.Resource type.

This method will validate all the configuration provided.

func (*Containers) Validate added in v0.3.0

func (c *Containers) Validate() error

Validate validates Containers configuration.

Validate is also part of types.ResourceConfig interface.

Jump to

Keyboard shortcuts

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