cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// None of cluster addresses are blocked in target cluster.
	StatusUnblocked = BlackholeStatus("unblocked")

	// All cluster addresses are blocked in target cluster.
	StatusBlocked = BlackholeStatus("blocked")

	// Some of cluster addresses are blocked in target cluster.
	StatusPartlyBlocked = BlackholeStatus("partly-blocked")
)

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type BlackholeStatus

type BlackholeStatus string

type BlockedCluster

type BlockedCluster struct {
	Context            string
	NodeAddresses      []string
	APIServerAddresses []string
	RouteAddresses     []string
	// contains filtered or unexported fields
}

func NewBlockedCluster

func NewBlockedCluster(config *api.Config, context string) (*BlockedCluster, error)

func (*BlockedCluster) AllAddresses

func (c *BlockedCluster) AllAddresses() []string

AllAddresses return sorted list of uniqe cluster address that must be blocked on the target cluster.

func (*BlockedCluster) Inspect

func (c *BlockedCluster) Inspect() error

type ClusterStatus

type ClusterStatus struct {
	Valid bool
	Nodes map[string]BlackholeStatus
}

type Command

type Command struct {
	Cluster *BlockedCluster
	Targets []*TargetCluster
}

func NewCommand

func NewCommand(blockedContext string, targetContexts []string, kubeconfig string) (*Command, error)

func (*Command) BlockCluster

func (c *Command) BlockCluster() error

func (*Command) ClusterStatus

func (c *Command) ClusterStatus() (map[string]*ClusterStatus, error)

func (*Command) InspectClusters

func (c *Command) InspectClusters() error

func (*Command) UnblockCluster

func (c *Command) UnblockCluster() error

type Result

type Result struct {
	Context string
	Node    string
	Routes  sets.Set[string]
	Err     error
}

type TargetCluster

type TargetCluster struct {
	Context   string
	NodeNames []string
	// contains filtered or unexported fields
}

func NewTargetCluster

func NewTargetCluster(config *api.Config, context string) (*TargetCluster, error)

func (*TargetCluster) Inspect

func (c *TargetCluster) Inspect() error

Jump to

Keyboard shortcuts

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