Documentation ¶
Index ¶
- func ManifestWorkStatusHash(work *workv1.ManifestWork) (string, error)
- type ClientHolder
- type ClientHolderBuilder
- func (b *ClientHolderBuilder) NewClientHolder(ctx context.Context) (*ClientHolder, error)
- func (b *ClientHolderBuilder) WithClusterName(clusterName string) *ClientHolderBuilder
- func (b *ClientHolderBuilder) WithCodecs(codecs ...generic.Codec[*workv1.ManifestWork]) *ClientHolderBuilder
- func (b *ClientHolderBuilder) WithInformerConfig(resyncTime time.Duration, options ...workinformers.SharedInformerOption) *ClientHolderBuilder
- type ManifestWorkLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManifestWorkStatusHash ¶
func ManifestWorkStatusHash(work *workv1.ManifestWork) (string, error)
ManifestWorkStatusHash returns the SHA256 checksum of a ManifestWork status.
Types ¶
type ClientHolder ¶
type ClientHolder struct {
// contains filtered or unexported fields
}
ClientHolder holds a manifestwork client that implements the ManifestWorkInterface based on different configuration and a ManifestWorkInformer that is built with the manifestWork client.
ClientHolder also implements the ManifestWorksGetter interface.
func (*ClientHolder) ManifestWorkInformer ¶
func (h *ClientHolder) ManifestWorkInformer() workv1informers.ManifestWorkInformer
ManifestWorkInformer returns a ManifestWorkInformer
func (*ClientHolder) ManifestWorks ¶
func (h *ClientHolder) ManifestWorks(namespace string) workv1client.ManifestWorkInterface
ManifestWorks returns a ManifestWorkInterface
type ClientHolderBuilder ¶
type ClientHolderBuilder struct {
// contains filtered or unexported fields
}
ClientHolderBuilder builds the ClientHolder with different configuration.
func NewClientHolderBuilder ¶
func NewClientHolderBuilder(clientID string, config any) *ClientHolderBuilder
NewClientHolderBuilder returns a ClientHolderBuilder with a given configuration.
Available configurations:
- Kubeconfig (*rest.Config): builds a manifestwork client with kubeconfig
- MQTTOptions (*mqtt.MQTTOptions): builds a manifestwork client based on cloudevents with MQTT
func (*ClientHolderBuilder) NewClientHolder ¶
func (b *ClientHolderBuilder) NewClientHolder(ctx context.Context) (*ClientHolder, error)
NewClientHolder returns a ClientHolder for works.
func (*ClientHolderBuilder) WithClusterName ¶
func (b *ClientHolderBuilder) WithClusterName(clusterName string) *ClientHolderBuilder
WithClusterName set the managed cluster name when building a manifestwork client for an agent.
func (*ClientHolderBuilder) WithCodecs ¶
func (b *ClientHolderBuilder) WithCodecs(codecs ...generic.Codec[*workv1.ManifestWork]) *ClientHolderBuilder
WithCodecs add codecs when building a manifestwork client based on cloudevents.
func (*ClientHolderBuilder) WithInformerConfig ¶
func (b *ClientHolderBuilder) WithInformerConfig( resyncTime time.Duration, options ...workinformers.SharedInformerOption) *ClientHolderBuilder
WithInformerConfig set the ManifestWorkInformer configs. If the resync time is not set, the default time (10 minutes) will be used when building the ManifestWorkInformer.
type ManifestWorkLister ¶
type ManifestWorkLister struct {
Lister workv1lister.ManifestWorkLister
}
ManifestWorkLister list the ManifestWorks from a ManifestWorkInformer's local cache.
func (*ManifestWorkLister) List ¶
func (l *ManifestWorkLister) List(options types.ListOptions) ([]*workv1.ManifestWork, error)
List returns the ManifestWorks from a ManifestWorkInformer's local cache.