connection

package
v2.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInitialInterval = 100 * time.Millisecond
	DefaultMaxInterval     = 1 * time.Second
)
View Source
const (
	ConnectionRunning = "running"
	ConnectionFail    = "fail"
)

Variables

View Source
var DefaultBackoffMaxElapsedDuration = 3 * time.Minute

Functions

func CreateMockConnection

func CreateMockConnection(ctx api.StreamContext, props map[string]any) (modules.Connection, error)

func CreateMockErrConnection

func CreateMockErrConnection(ctx api.StreamContext, props map[string]any) (modules.Connection, error)

func CreateNamedConnection

func CreateNamedConnection(ctx api.StreamContext, id, typ string, props map[string]any) (modules.Connection, error)

func CreateNonStoredConnection

func CreateNonStoredConnection(ctx api.StreamContext, id, typ string, props map[string]any) (modules.Connection, error)

func DetachConnection

func DetachConnection(ctx api.StreamContext, id string, props map[string]interface{}) error

func DropNameConnection

func DropNameConnection(ctx api.StreamContext, selId string) error

func FetchConnection

func FetchConnection(ctx api.StreamContext, id, typ string, props map[string]interface{}) (modules.Connection, error)

func GetAllConnectionStatus

func GetAllConnectionStatus(ctx api.StreamContext) map[string]ConnectionStatus

func GetAllConnectionsID

func GetAllConnectionsID() []string

func GetConnectionRef

func GetConnectionRef(id string) int

func InitConnectionManager

func InitConnectionManager()

func InitConnectionManager4Test

func InitConnectionManager4Test() error

func InitMockTest

func InitMockTest()

func NewExponentialBackOff

func NewExponentialBackOff() *backoff.ExponentialBackOff

func PingConnection

func PingConnection(ctx api.StreamContext, id string) error

func ReloadConnection

func ReloadConnection() error

Types

type ConnectionManager

type ConnectionManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type ConnectionMeta

type ConnectionMeta struct {
	ID    string         `json:"id"`
	Typ   string         `json:"typ"`
	Props map[string]any `json:"props"`
	// contains filtered or unexported fields
}

type ConnectionStatus

type ConnectionStatus struct {
	Status string
	ErrMsg string
}

Jump to

Keyboard shortcuts

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