v1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileMode defines the file mode used to create the state file.
	FileMode = 0600
)
View Source
const Version = SchemaVersion(1)

Variables

This section is empty.

Functions

This section is empty.

Types

type SchemaVersion

type SchemaVersion int

type State

type State struct {
	SchemaVersion SchemaVersion           `json:"schemaVersion"`
	Filename      string                  `json:"-"`
	KubeClient    kubernetes.Interface    `json:"-"`
	ClusterClient clusterclient.Interface `json:"-"`
	SPClient      spclient.Interface      `json:"-"`

	SecretList             corev1.SecretList           `json:"secretList,omitempty"`
	ClusterList            clusterv1.ClusterList       `json:"clusterList,omitempty"`
	MachineList            clusterv1.MachineList       `json:"machineList,omitempty"`
	ProvisionedMachineList spv1.ProvisionedMachineList `json:"provisionedMachineList,omitempty"`
}

State holds all the objects that make up cctl state.State Contains unexported fields.

func NewWithFile

func NewWithFile(filename string, kubeClient kubernetes.Interface, clusterClient clusterclient.Interface, spClient spclient.Interface) *State

NewWithFile returns the state ready to sync objects between the APIs and the file.

func (*State) PullFromAPIs

func (s *State) PullFromAPIs() error

PullFromAPIs stores API objects in the state file. If the file does not exist, it will be created.

func (*State) PushToAPIs

func (s *State) PushToAPIs() error

PushToAPIs reads objects in the state file and creates them using the APIs. If the file does not exist, it will be created.

Jump to

Keyboard shortcuts

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