Documentation
¶
Index ¶
- Constants
- func PhysicalClusterNamespaceName(l NamespaceLocator) (string, error)
- func StartSyncer(ctx context.Context, upstream, downstream *rest.Config, resources sets.String, ...) error
- type Controller
- func New(cluster, logicalCluster string, fromDiscovery discovery.DiscoveryInterface, ...) (*Controller, error)
- func NewSpecSyncer(from, to *rest.Config, syncedResourceTypes []string, ...) (*Controller, error)
- func NewStatusSyncer(from, to *rest.Config, syncedResourceTypes []string, ...) (*Controller, error)
- type DeleteFunc
- type Direction
- type HandlersProvider
- type NamespaceLocator
- type UpsertFunc
Constants ¶
View Source
const (
SyncerNamespaceKey = "SYNCER_NAMESPACE"
)
Variables ¶
This section is empty.
Functions ¶
func PhysicalClusterNamespaceName ¶
func PhysicalClusterNamespaceName(l NamespaceLocator) (string, error)
PhysicalClusterNamespaceName encodes the NamespaceLocator to a new namespace name for use on a physical cluster. The encoding is repeatable.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(cluster, logicalCluster string, fromDiscovery discovery.DiscoveryInterface, fromClient, toClient dynamic.Interface, direction Direction, syncedResourceTypes []string, clusterID string) (*Controller, error)
New returns a new syncer Controller syncing spec from "from" to "to".
func NewSpecSyncer ¶
func NewStatusSyncer ¶
func (*Controller) AddToQueue ¶
func (c *Controller) AddToQueue(gvr schema.GroupVersionResource, obj interface{})
type DeleteFunc ¶
type Direction ¶
type Direction string
Direction indicates which direction data is flowing for this particular syncer
const KcpToPhysicalCluster Direction = "kcpToPhysicalCluster"
KcpToPhysicalCluster indicates a syncer watches resources on KCP and applies the spec to the target cluster
const PhysicalClusterToKcp Direction = "physicalClusterToKcp"
PhysicalClusterToKcp indicates a syncer watches resources on the target cluster and applies the status to KCP
type HandlersProvider ¶
type HandlersProvider func(c *Controller, gvr schema.GroupVersionResource) cache.ResourceEventHandlerFuncs
type NamespaceLocator ¶
type NamespaceLocator struct {
LogicalCluster string `json:"logical-cluster"`
Namespace string `json:"namespace"`
}
NamespaceLocator stores a logical cluster and namespace and is used as the source for the mapped namespace name in a physical cluster.
type UpsertFunc ¶
type UpsertFunc func(ctx context.Context, gvr schema.GroupVersionResource, namespace string, unstrob *unstructured.Unstructured) error
Click to show internal directories.
Click to hide internal directories.