operator

package
v1.13.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 16 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)

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) 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.

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