input

package
v0.10.9 Latest Latest
Warning

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

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

Documentation

Overview

Utility for manually building input snapshots. Used primarily in tests.

Utility for manually building input snapshots. Used primarily in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInputReconciler added in v0.10.8

func RegisterInputReconciler(
	ctx context.Context,
	clusters multicluster.ClusterWatcher,
	multiClusterReconcileFunc input.MultiClusterReconcileFunc,
	mgr manager.Manager,
	singleClusterReconcileFunc input.SingleClusterReconcileFunc,
	options ReconcileOptions,
) (input.InputReconciler, error)

register the given multi cluster reconcile func with the cluster watcher register the given single cluster reconcile func with the local manager

Types

type InputLocalSnapshotManualBuilder added in v0.10.8

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

func NewInputLocalSnapshotManualBuilder added in v0.10.8

func NewInputLocalSnapshotManualBuilder(name string) *InputLocalSnapshotManualBuilder

func (*InputLocalSnapshotManualBuilder) AddSettings added in v0.10.8

func (*InputLocalSnapshotManualBuilder) Build added in v0.10.8

type InputRemoteSnapshotManualBuilder added in v0.10.8

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

func NewInputRemoteSnapshotManualBuilder added in v0.10.8

func NewInputRemoteSnapshotManualBuilder(name string) *InputRemoteSnapshotManualBuilder

func (*InputRemoteSnapshotManualBuilder) AddConfigMaps added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddDaemonSets added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddDeployments added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddMeshes added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddNodes added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddPods added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddReplicaSets added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddServices added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) AddStatefulSets added in v0.10.8

func (*InputRemoteSnapshotManualBuilder) Build added in v0.10.8

type LocalBuildOptions added in v0.10.8

type LocalBuildOptions struct {

	// List options for composing a snapshot from Settings
	Settings ResourceLocalBuildOptions
}

Options for building a snapshot

type LocalBuilder added in v0.10.8

type LocalBuilder interface {
	BuildSnapshot(ctx context.Context, name string, opts LocalBuildOptions) (LocalSnapshot, error)
}

builds the input snapshot from API Clients.

func NewSingleClusterLocalBuilder added in v0.10.8

func NewSingleClusterLocalBuilder(
	mgr manager.Manager,
) LocalBuilder

Produces snapshots of resources across all clusters defined in the ClusterSet

type LocalReconcileOptions added in v0.10.8

type LocalReconcileOptions struct {

	// Options for reconciling Settings
	Settings reconcile.Options

	// optional predicates for filtering local events
	Predicates []predicate.Predicate
}

Options for reconciling a snapshot in remote clusters

type LocalSnapshot added in v0.10.8

type LocalSnapshot interface {

	// return the set of input Settings
	Settings() settings_mesh_gloo_solo_io_v1alpha2_sets.SettingsSet
	// update the status of all input objects which support
	// the Status subresource (in the local cluster)
	SyncStatuses(ctx context.Context, c client.Client, opts LocalSyncStatusOptions) error
	// serialize the entire snapshot as JSON
	MarshalJSON() ([]byte, error)
}

the snapshot of input resources consumed by translation

func NewLocalSnapshot added in v0.10.8

type LocalSyncStatusOptions added in v0.10.8

type LocalSyncStatusOptions struct {

	// sync status of Settings objects
	Settings bool
}

options for syncing input object statuses

type ReconcileOptions

type ReconcileOptions struct {
	Remote RemoteReconcileOptions
	Local  LocalReconcileOptions

	// the ReconcileInterval, if greater than 0, will limit the number of reconciles
	// to one per interval.
	ReconcileInterval time.Duration
}

type RemoteBuildOptions added in v0.10.8

type RemoteBuildOptions struct {

	// List options for composing a snapshot from Meshes
	Meshes ResourceRemoteBuildOptions

	// List options for composing a snapshot from ConfigMaps
	ConfigMaps ResourceRemoteBuildOptions
	// List options for composing a snapshot from Services
	Services ResourceRemoteBuildOptions
	// List options for composing a snapshot from Pods
	Pods ResourceRemoteBuildOptions
	// List options for composing a snapshot from Nodes
	Nodes ResourceRemoteBuildOptions

	// List options for composing a snapshot from Deployments
	Deployments ResourceRemoteBuildOptions
	// List options for composing a snapshot from ReplicaSets
	ReplicaSets ResourceRemoteBuildOptions
	// List options for composing a snapshot from DaemonSets
	DaemonSets ResourceRemoteBuildOptions
	// List options for composing a snapshot from StatefulSets
	StatefulSets ResourceRemoteBuildOptions
}

Options for building a snapshot

type RemoteBuilder added in v0.10.8

type RemoteBuilder interface {
	BuildSnapshot(ctx context.Context, name string, opts RemoteBuildOptions) (RemoteSnapshot, error)
}

builds the input snapshot from API Clients.

func NewMultiClusterRemoteBuilder added in v0.10.8

func NewMultiClusterRemoteBuilder(
	clusters multicluster.Interface,
	client multicluster.Client,
) RemoteBuilder

Produces snapshots of resources across all clusters defined in the ClusterSet

type RemoteReconcileOptions added in v0.10.8

type RemoteReconcileOptions struct {

	// Options for reconciling Meshes
	Meshes reconcile.Options

	// Options for reconciling ConfigMaps
	ConfigMaps reconcile.Options
	// Options for reconciling Services
	Services reconcile.Options
	// Options for reconciling Pods
	Pods reconcile.Options
	// Options for reconciling Nodes
	Nodes reconcile.Options

	// Options for reconciling Deployments
	Deployments reconcile.Options
	// Options for reconciling ReplicaSets
	ReplicaSets reconcile.Options
	// Options for reconciling DaemonSets
	DaemonSets reconcile.Options
	// Options for reconciling StatefulSets
	StatefulSets reconcile.Options

	// optional predicates for filtering remote events
	Predicates []predicate.Predicate
}

Options for reconciling a snapshot in remote clusters

type RemoteSnapshot added in v0.10.8

type RemoteSnapshot interface {

	// return the set of input Meshes
	Meshes() appmesh_k8s_aws_v1beta2_sets.MeshSet

	// return the set of input ConfigMaps
	ConfigMaps() v1_sets.ConfigMapSet
	// return the set of input Services
	Services() v1_sets.ServiceSet
	// return the set of input Pods
	Pods() v1_sets.PodSet
	// return the set of input Nodes
	Nodes() v1_sets.NodeSet

	// return the set of input Deployments
	Deployments() apps_v1_sets.DeploymentSet
	// return the set of input ReplicaSets
	ReplicaSets() apps_v1_sets.ReplicaSetSet
	// return the set of input DaemonSets
	DaemonSets() apps_v1_sets.DaemonSetSet
	// return the set of input StatefulSets
	StatefulSets() apps_v1_sets.StatefulSetSet
	// serialize the entire snapshot as JSON
	MarshalJSON() ([]byte, error)
}

the snapshot of input resources consumed by translation

func NewRemoteSnapshot added in v0.10.8

func NewRemoteSnapshot(
	name string,

	meshes appmesh_k8s_aws_v1beta2_sets.MeshSet,

	configMaps v1_sets.ConfigMapSet,
	services v1_sets.ServiceSet,
	pods v1_sets.PodSet,
	nodes v1_sets.NodeSet,

	deployments apps_v1_sets.DeploymentSet,
	replicaSets apps_v1_sets.ReplicaSetSet,
	daemonSets apps_v1_sets.DaemonSetSet,
	statefulSets apps_v1_sets.StatefulSetSet,

) RemoteSnapshot

type RemoteSyncStatusOptions added in v0.10.8

type RemoteSyncStatusOptions struct {

	// sync status of Mesh objects
	Mesh bool

	// sync status of ConfigMap objects
	ConfigMap bool
	// sync status of Service objects
	Service bool
	// sync status of Pod objects
	Pod bool
	// sync status of Node objects
	Node bool

	// sync status of Deployment objects
	Deployment bool
	// sync status of ReplicaSet objects
	ReplicaSet bool
	// sync status of DaemonSet objects
	DaemonSet bool
	// sync status of StatefulSet objects
	StatefulSet bool
}

options for syncing input object statuses

type ResourceLocalBuildOptions added in v0.10.8

type ResourceLocalBuildOptions struct {

	// List options for composing a snapshot from a resource type
	ListOptions []client.ListOption

	// If provided, ensure the resource has been verified before adding it to snapshots
	Verifier verifier.ServerResourceVerifier
}

Options for reading resources of a given type

type ResourceRemoteBuildOptions added in v0.10.8

type ResourceRemoteBuildOptions struct {

	// List options for composing a snapshot from a resource type
	ListOptions []client.ListOption

	// If provided, ensure the resource has been verified before adding it to snapshots
	Verifier verifier.ServerResourceVerifier
}

Options for reading resources of a given type

Directories

Path Synopsis
Package mock_input is a generated GoMock package.
Package mock_input is a generated GoMock package.

Jump to

Keyboard shortcuts

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