connection

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTraceNotFound        = errors.New("trace not found")
	ErrInvalidConfiguration = errors.New("invalid data store configuration")
	ErrConnectionFailed     = errors.New("could not connect to data store")
)

Functions

func CheckReachability

func CheckReachability(endpoint string, protocol model.Protocol) error

Types

type DataStore

type DataStore interface {
	GetTraceByID(context.Context, string) (traces.Trace, error)
	GetTraceID() trace.TraceID
}

type TestStep

type TestStep interface {
	TestConnection(ctx context.Context) model.ConnectionTestStep
}

func ConnectivityStep

func ConnectivityStep(protocol model.Protocol, endpoints ...string) TestStep

func NewTestStep

func NewTestStep(f func(ctx context.Context) (string, error)) TestStep

func PortLinter

func PortLinter(dataStoreName string, expectedPorts []string, endpoints ...string) TestStep

func TracePollingTestStep

func TracePollingTestStep(ds DataStore) TestStep

type Tester

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

func NewTester

func NewTester(opts ...TesterOption) Tester

func (*Tester) TestConnection

func (t *Tester) TestConnection(ctx context.Context) (res model.ConnectionResult)

type TesterOption

type TesterOption func(*Tester)

func WithAuthenticationTest

func WithAuthenticationTest(step TestStep) TesterOption

func WithConnectivityTest

func WithConnectivityTest(step TestStep) TesterOption

func WithPollingTest

func WithPollingTest(step TestStep) TesterOption

func WithPortLintingTest

func WithPortLintingTest(step TestStep) TesterOption

Jump to

Keyboard shortcuts

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