work

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 5

Documentation

Index

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

ClientHolder also implements the ManifestWorksGetter interface.

func (*ClientHolder) ManifestWorks

func (h *ClientHolder) ManifestWorks(namespace string) workv1client.ManifestWorkInterface

ManifestWorks returns a ManifestWorkInterface

func (*ClientHolder) WorkInterface added in v0.14.0

func (h *ClientHolder) WorkInterface() workclientset.Interface

WorkInterface returns a workclientset Interface

type ClientHolderBuilder

type ClientHolderBuilder struct {
	// contains filtered or unexported fields
}

ClientHolderBuilder builds the ClientHolder with different configuration.

func NewClientHolderBuilder

func NewClientHolderBuilder(config any) *ClientHolderBuilder

NewClientHolderBuilder returns a ClientHolderBuilder with a given configuration.

Available configurations:

  • MQTTOptions (*mqtt.MQTTOptions): builds a manifestwork client based on cloudevents with MQTT
  • GRPCOptions (*grpc.GRPCOptions): builds a manifestwork client based on cloudevents with GRPC
  • KafkaOptions (*kafka.KafkaOptions): builds a manifestwork client based on cloudevents with Kafka

TODO using a specified config instead of any

func (*ClientHolderBuilder) NewAgentClientHolder added in v0.14.0

func (b *ClientHolderBuilder) NewAgentClientHolder(ctx context.Context) (*ClientHolder, error)

NewAgentClientHolder returns a ClientHolder for an agent

func (*ClientHolderBuilder) NewSourceClientHolder added in v0.14.0

func (b *ClientHolderBuilder) NewSourceClientHolder(ctx context.Context) (*ClientHolder, error)

NewSourceClientHolder returns a ClientHolder for a source

func (*ClientHolderBuilder) WithClientID added in v0.14.0

func (b *ClientHolderBuilder) WithClientID(clientID string) *ClientHolderBuilder

WithClientID set the client ID for source/agent cloudevents client.

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

WithCodecs add codecs when building a manifestwork client based on cloudevents.

func (*ClientHolderBuilder) WithResyncEnabled added in v0.14.0

func (b *ClientHolderBuilder) WithResyncEnabled(resync bool) *ClientHolderBuilder

WithResyncEnabled control the client resync (Default is true), if it's true, the resync happens when

  1. after the client's store is initiated
  2. the client reconnected

func (*ClientHolderBuilder) WithSourceID added in v0.14.0

func (b *ClientHolderBuilder) WithSourceID(sourceID string) *ClientHolderBuilder

WithSourceID set the source ID when building a manifestwork client for a source.

func (*ClientHolderBuilder) WithWorkClientWatcherStore added in v0.14.0

func (b *ClientHolderBuilder) WithWorkClientWatcherStore(store store.WorkClientWatcherStore) *ClientHolderBuilder

WithWorkClientWatcherStore set the WorkClientWatcherStore. The client will use this store to caches the works and watch the work events.

Directories

Path Synopsis
agent
source

Jump to

Keyboard shortcuts

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