placement

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option is a function that configures the process.

func WithEnableTLS

func WithEnableTLS(enable bool) Option

func WithExecOptions

func WithExecOptions(execOptions ...exec.Option) Option

func WithHealthzPort

func WithHealthzPort(port int) Option

func WithID

func WithID(id string) Option

func WithInitialCluster

func WithInitialCluster(initialCluster string) Option

func WithInitialClusterPorts

func WithInitialClusterPorts(ports ...int) Option

func WithLogLevel added in v1.13.0

func WithLogLevel(level string) Option

func WithMaxAPILevel added in v1.13.0

func WithMaxAPILevel(val int) Option

func WithMetadataEnabled added in v1.13.0

func WithMetadataEnabled(enabled bool) Option

func WithMetricsPort

func WithMetricsPort(port int) Option

func WithMinAPILevel added in v1.13.0

func WithMinAPILevel(val int) Option

func WithPort

func WithPort(port int) Option

func WithSentryAddress

func WithSentryAddress(sentryAddress string) Option

func WithTrustAnchorsFile

func WithTrustAnchorsFile(file string) Option

type Placement

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

func New

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

func (*Placement) Address added in v1.12.4

func (p *Placement) Address() string

func (*Placement) AssertRegisterHostFails added in v1.13.0

func (p *Placement) AssertRegisterHostFails(t *testing.T, ctx context.Context, apiLevel int)

AssertRegisterHostFails Expect the registration to fail with FailedPrecondition.

func (*Placement) CheckAPILevelInState added in v1.13.0

func (p *Placement) CheckAPILevelInState(t require.TestingT, client *http.Client, expectedAPILevel int) (tableVersion int)

CheckAPILevelInState Checks the API level reported in the state table matched.

func (*Placement) Cleanup

func (p *Placement) Cleanup(t *testing.T)

func (*Placement) CurrentActorsAPILevel added in v1.13.0

func (p *Placement) CurrentActorsAPILevel() int

func (*Placement) HealthzPort

func (p *Placement) HealthzPort() int

func (*Placement) ID

func (p *Placement) ID() string

func (*Placement) InitialCluster

func (p *Placement) InitialCluster() string

func (*Placement) InitialClusterPorts

func (p *Placement) InitialClusterPorts() []int

func (*Placement) MetricsPort

func (p *Placement) MetricsPort() int

func (*Placement) Port

func (p *Placement) Port() int

func (*Placement) RegisterHost added in v1.13.0

func (p *Placement) RegisterHost(t *testing.T, ctx context.Context, msg *placementv1pb.Host) chan *placementv1pb.PlacementTables

RegisterHost Registers a host with the placement service using default context metadata

func (*Placement) RegisterHostWithMetadata added in v1.13.0

func (p *Placement) RegisterHostWithMetadata(t *testing.T, parentCtx context.Context, msg *placementv1pb.Host, contextMetadata map[string]string) chan *placementv1pb.PlacementTables

func (*Placement) Run

func (p *Placement) Run(t *testing.T, ctx context.Context)

func (*Placement) WaitUntilRunning

func (p *Placement) WaitUntilRunning(t *testing.T, ctx context.Context)

Jump to

Keyboard shortcuts

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