Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) AddServiceKey(key client.ObjectKey)
- func (c *Cluster) ExpireTime() time.Time
- func (c *Cluster) GetAllServiceKeys() []client.ObjectKey
- func (c *Cluster) IsExpired() bool
- func (c *Cluster) Name() string
- func (c *Cluster) RemoveServiceKey(key client.ObjectKey)
- func (c *Cluster) SetExpireTime(expireTime time.Time)
- type ClusterStore
- type Empty
- type ExportGlobalServiceFunc
- type GlobalServiceManager
- type ObjectKeySet
- type RevokeGlobalServiceFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster is used to store all keys of global services reported by a cluster. A cluster should be created by ClusterStore.New method
func (*Cluster) AddServiceKey ¶
func (*Cluster) ExpireTime ¶
func (*Cluster) GetAllServiceKeys ¶
func (*Cluster) RemoveServiceKey ¶
func (*Cluster) SetExpireTime ¶
type ClusterStore ¶
type ClusterStore struct {
// contains filtered or unexported fields
}
ClusterStore is used to manage clusters and is thread-safe
func NewClusterStore ¶
func NewClusterStore() *ClusterStore
func (*ClusterStore) Get ¶
func (store *ClusterStore) Get(name string) *Cluster
func (*ClusterStore) GetExpiredClusters ¶
func (store *ClusterStore) GetExpiredClusters() []*Cluster
func (*ClusterStore) New ¶
func (store *ClusterStore) New(name string) *Cluster
func (*ClusterStore) Remove ¶
func (store *ClusterStore) Remove(name string)
func (*ClusterStore) RemoveClusters ¶
func (store *ClusterStore) RemoveClusters(names ...string)
type ExportGlobalServiceFunc ¶
type ExportGlobalServiceFunc func(ctx context.Context, service apis.GlobalService) error
type GlobalServiceManager ¶
type GlobalServiceManager interface { // CreateOrMergeGlobalService will create global service if not exists // otherwise merge endpoints and ports of service passed in CreateOrMergeGlobalService(ctx context.Context, service apis.GlobalService) error // RevokeGlobalService will remove endpoints of cluster from global service // specified by namespace/name, if no endpoints left, the global service will // be also deleted RevokeGlobalService(ctx context.Context, clusterName, namespace, serviceName string) error }
func NewGlobalServiceManager ¶
func NewGlobalServiceManager(cli client.Client, allowCreateNamespace bool) GlobalServiceManager
type ObjectKeySet ¶
func NewObjectKeySet ¶
func NewObjectKeySet() ObjectKeySet
func (ObjectKeySet) Add ¶
func (set ObjectKeySet) Add(key client.ObjectKey)
func (ObjectKeySet) Delete ¶
func (set ObjectKeySet) Delete(key client.ObjectKey)
Click to show internal directories.
Click to hide internal directories.