Documentation ¶
Index ¶
Constants ¶
View Source
const (
// FileMode defines the file mode used to create the state file.
FileMode = 0600
)
View Source
const Version = SchemaVersion(2)
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 ¶
PullFromAPIs stores API objects in the state file. If the file does not exist, it will be created.
func (*State) PushToAPIs ¶
PushToAPIs reads objects in the state file and creates them using the APIs. If the file does not exist, it will be created.
Click to show internal directories.
Click to hide internal directories.