placement

package
v0.0.0-...-949823d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 24 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

func WithLogLevel(level string) Option

func WithMaxAPILevel

func WithMaxAPILevel(val int) Option

func WithMetadataEnabled

func WithMetadataEnabled(enabled bool) Option

func WithMetricsPort

func WithMetricsPort(port int) Option

func WithMinAPILevel

func WithMinAPILevel(val int) Option

func WithPort

func WithPort(port int) Option

func WithSentry

func WithSentry(t *testing.T, sentry *sentry.Sentry) 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

func (p *Placement) Address() string

func (*Placement) AssertRegisterHostFails

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

AssertRegisterHostFails Expect the registration to fail with FailedPrecondition.

func (*Placement) CheckAPILevelInState

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

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

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

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