Help us shape the future of Go! Take the 2026 Go Developer Survey

operator

package
v1.16.21 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithComponentUpdateFn

func WithComponentUpdateFn(fn func(*operatorv1.ComponentUpdateRequest, operatorv1.Operator_ComponentUpdateServer) error) func(*options)

func WithGRPCOptions

func WithGRPCOptions(opts ...procgrpc.Option) func(*options)

func WithGetConfigurationFn

func WithGetConfigurationFn(fn func(context.Context, *operatorv1.GetConfigurationRequest) (*operatorv1.GetConfigurationResponse, error)) func(*options)

func WithGetResiliencyFn

func WithGetResiliencyFn(fn func(context.Context, *operatorv1.GetResiliencyRequest) (*operatorv1.GetResiliencyResponse, error)) func(*options)

func WithListComponentsFn

func WithListComponentsFn(fn func(context.Context, *operatorv1.ListComponentsRequest) (*operatorv1.ListComponentResponse, error)) func(*options)

func WithListResiliencyFn

func WithListResiliencyFn(fn func(context.Context, *operatorv1.ListResiliencyRequest) (*operatorv1.ListResiliencyResponse, error)) func(*options)

func WithListSubscriptionsFn

func WithListSubscriptionsFn(fn func(context.Context, *emptypb.Empty) (*operatorv1.ListSubscriptionsResponse, error)) func(*options)

func WithListSubscriptionsV2Fn

func WithListSubscriptionsV2Fn(fn func(context.Context, *operatorv1.ListSubscriptionsRequest) (*operatorv1.ListSubscriptionsResponse, error)) func(*options)

func WithSentry

func WithSentry(sentry *sentry.Sentry) func(*options)

func WithSubscriptionUpdateFn added in v1.14.0

func WithSubscriptionUpdateFn(fn func(*operatorv1.SubscriptionUpdateRequest, operatorv1.Operator_SubscriptionUpdateServer) error) func(*options)

Types

type Operator

type Operator struct {
	*procgrpc.GRPC
	// contains filtered or unexported fields
}

Operator is a wrapper around a grpc.Server that implements the Operator API.

func New

func New(t *testing.T, fopts ...Option) *Operator

func (*Operator) AddComponents

func (o *Operator) AddComponents(cs ...compapi.Component)

Add Component adds a component to the publish list of installed components.

func (*Operator) AddSubscriptions added in v1.14.0

func (o *Operator) AddSubscriptions(subs ...subapi.Subscription)

func (*Operator) Cleanup

func (o *Operator) Cleanup(t *testing.T)

func (*Operator) ComponentUpdateEvent

func (o *Operator) ComponentUpdateEvent(t *testing.T, ctx context.Context, event *api.ComponentUpdateEvent)

ComponentUpdateEvent sends a component update event to the operator which will be piped to clients listening on ComponentUpdate.

func (*Operator) Components

func (o *Operator) Components() []compapi.Component

Components returns the list of installed components.

func (*Operator) SetComponents

func (o *Operator) SetComponents(cs ...compapi.Component)

SetComponents sets the list of installed components.

func (*Operator) SetSubscriptions added in v1.14.0

func (o *Operator) SetSubscriptions(subs ...subapi.Subscription)

func (*Operator) SubscriptionUpdateEvent added in v1.14.0

func (o *Operator) SubscriptionUpdateEvent(t *testing.T, ctx context.Context, event *api.SubscriptionUpdateEvent)

func (*Operator) Subscriptions added in v1.14.0

func (o *Operator) Subscriptions() []subapi.Subscription

type Option

type Option func(*options)

Option is a function that configures the process.

Jump to

Keyboard shortcuts

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