commonco

package
v2.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetInitParams

func SetInitParams(ctx context.Context, clusterFlavor cnstypes.CnsClusterFlavor, initParams *interface{},
	supervisorFSSName, supervisorFSSNamespace, internalFSSName, internalFSSNamespace, serviceMode string)

SetInitParams initializes the parameters required to create a container agnostic orchestrator instance.

Types

type COCommonInterface

type COCommonInterface interface {
	// Check if feature state switch is enabled for the given feature indicated
	// by featureName.
	IsFSSEnabled(ctx context.Context, featureName string) bool
	// Check if the passed volume can be fake attached.
	IsFakeAttachAllowed(ctx context.Context, volumeID string, volumeManager cnsvolume.Manager) (bool, error)
	// Mark the volume as fake attached.
	MarkFakeAttached(ctx context.Context, volumeID string) error
	// Check if the volume was fake attached, and unmark it as not fake attached.
	ClearFakeAttached(ctx context.Context, volumeID string) error
	// InitTopologyServiceInController initializes the necessary resources
	// required for topology related functionality in the controller.
	InitTopologyServiceInController(ctx context.Context) (types.ControllerTopologyService, error)
	// InitTopologyServiceInNode initializes the necessary resources
	// required for topology related functionality in the nodes.
	InitTopologyServiceInNode(ctx context.Context) (types.NodeTopologyService, error)
}

COCommonInterface provides functionality to define container orchestrator related implementation to read resources/objects.

var ContainerOrchestratorUtility COCommonInterface

ContainerOrchestratorUtility represents the singleton instance of container orchestrator interface.

func GetContainerOrchestratorInterface

func GetContainerOrchestratorInterface(ctx context.Context, orchestratorType int,
	clusterFlavor cnstypes.CnsClusterFlavor, params interface{}) (COCommonInterface, error)

GetContainerOrchestratorInterface returns orchestrator object for a given container orchestrator type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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