test

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.5.9

type Client interface {
	// Start starts the client
	Start(driverPort, agentPort int) error
	// Connect connects the client to the given primitive server
	Connect(ctx context.Context, primitive primitive.Type, name string) (*grpc.ClientConn, error)
	// Stop stops the client
	Stop() error
}

Client is an interface for implementing the client for a test protocol

type Option added in v0.5.9

type Option interface {
	// contains filtered or unexported methods
}

Option is a test option

func WithDebugLogs added in v0.5.9

func WithDebugLogs() Option

WithDebugLogs sets whether to enable debug logs for the test

func WithPartitions added in v0.5.9

func WithPartitions(partitions int) Option

WithPartitions sets the number of partitions to test

func WithReplicas added in v0.5.9

func WithReplicas(replicas int) Option

WithReplicas sets the number of replicas to test

type Protocol added in v0.5.14

type Protocol interface {
	// NewReplica creates a new test replica
	NewReplica(network cluster.Network, replica protocolapi.ProtocolReplica, protocol protocolapi.ProtocolConfig) Replica
	// NewClient creates a new test client
	NewClient(network cluster.Network, clientID string, protocol protocolapi.ProtocolConfig) Client
}

Protocol is a test protocol implementation

type Replica added in v0.5.9

type Replica interface {
	// Start starts the replica
	Start() error
	// Stop stops the replica
	Stop() error
}

Replica is an interface for implementing a test protocol replica

type Test added in v0.5.9

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

Test is an Atomix test utility

func NewTest added in v0.5.9

func NewTest(protocol Protocol, opts ...Option) *Test

NewTest creates a new Atomix test

func (*Test) NewClient added in v0.5.9

func (t *Test) NewClient(clientID string) (atomix.Client, error)

NewClient creates a new test client

func (*Test) Start added in v0.5.9

func (t *Test) Start() error

Start starts the test

func (*Test) Stop added in v0.5.9

func (t *Test) Stop() error

Stop stops the test

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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