types

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Connected    = 0
	Disconnected = 1
)
View Source
const (
	Opened = 0
	Closed = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conduit

type Conduit interface {
	GetName() string
	Connect(ctx context.Context) error
	Disconnect(ctx context.Context) error
	AddStream(context.Context, Stream) error
	RemoveStream(context.Context, Stream) error
	GetStreams(stream *nspAPI.Stream) []Stream
	GetTrench() Trench
	GetIPs() []string
	SetVIPs(vips []string) error
	Equals(*nspAPI.Conduit) bool
	GetStatus() ConduitStatus
}

type ConduitStatus

type ConduitStatus int

type Stream

type Stream interface {
	// GetName returns the name of the stream
	GetName() string
	// Open the stream in the conduit by generating a identifier and registering
	// the target to the NSP service while avoiding the identifier collisions.
	Open(ctx context.Context) error
	// Close the stream in the conduit by unregistering target from the NSP service.
	Close(ctx context.Context) error
	// GetConduit returns the conduit the stream belongs to.
	GetConduit() Conduit
	//
	Equals(*nspAPI.Stream) bool
	GetStatus() StreamStatus
}

Stream is an interface that rate limits items being added to the queue.

type StreamStatus

type StreamStatus int

type Trench

type Trench interface {
	GetName() string
	GetNamespace() string
	Delete(ctx context.Context) error
	AddConduit(context.Context, Conduit) error
	RemoveConduit(context.Context, Conduit) error
	GetConduits(conduit *nspAPI.Conduit) []Conduit
	GetTargetRegistryClient() nspAPI.TargetRegistryClient
	Equals(*nspAPI.Trench) bool
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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