routines

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportCluster added in v0.7.0

func ExportCluster(interval time.Duration, clusterName string, clusterCIDRs []string, getConnector types.EndpointGetter, updateCluster UpdateCluster) manager.Runnable

ExportCluster is used to export cluster CIDRs and endpoints to host cluster

func ExportEndpoints

func ExportEndpoints(interval time.Duration, getConnector types.EndpointGetter, updateEndpoints UpdateEndpointsFunc) manager.Runnable

func LoadEndpointsAndCommunities

func LoadEndpointsAndCommunities(interval time.Duration, store storepkg.Interface, getEndpointsAndCommunities GetEndpointsAndCommunitiesFunc) manager.Runnable

func NewIPPool added in v0.7.0

func NewIPPool(clusterName, cidr string) calicoapi.IPPool

func NewIPPoolKeeper added in v0.7.0

func NewIPPoolKeeper(interval time.Duration, localClusterName string, cli client.Client, getClusterCIDRInfo types.GetClusterCIDRInfo) manager.Runnable

func Periodic

func Periodic(interval time.Duration, fn func(ctx context.Context)) manager.Runnable

Types

type GetEndpointsAndCommunitiesFunc

type GetEndpointsAndCommunitiesFunc func() (apiserver.EndpointsAndCommunity, error)

type LocalClusterReporter

type LocalClusterReporter struct {
	Cluster      string
	ClusterCIDRs []string
	GetConnector types.EndpointGetter
	SyncInterval time.Duration
	Client       client.Client
	Log          logr.Logger
}

LocalClusterReporter create or update cluster data in the cluster where controller is running

func (*LocalClusterReporter) Start

func (ctl *LocalClusterReporter) Start(ctx context.Context) error

type UpdateCluster added in v0.7.0

type UpdateCluster func(cluster apis.Cluster) error

type UpdateEndpointsFunc

type UpdateEndpointsFunc func(endpoints []apis.Endpoint) error

Jump to

Keyboard shortcuts

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