Documentation ¶
Index ¶
- Constants
- Variables
- func CheckConn(id string) bool
- func CreateMockConnection(ctx api.StreamContext, props map[string]any) (modules.Connection, error)
- func CreateMockErrConnection(ctx api.StreamContext, props map[string]any) (modules.Connection, error)
- func DetachConnection(ctx api.StreamContext, id string, props map[string]interface{}) error
- func DropNameConnection(ctx api.StreamContext, selId string) error
- func GetAllConnectionStatus(ctx api.StreamContext) map[string]ConnectionStatus
- func GetAllConnectionsID() []string
- func GetConnectionRef(id string) int
- func InitConnectionManager()
- func InitConnectionManager4Test() error
- func InitMockTest()
- func IsConnectionExists(id string) bool
- func NewExponentialBackOff() *backoff.ExponentialBackOff
- func PingConnection(ctx api.StreamContext, id string) error
- func ReloadConnection() error
- type ConnWrapper
- type ConnectionManager
- type ConnectionMeta
- type ConnectionStatus
Constants ¶
View Source
const ( DefaultInitialInterval = 100 * time.Millisecond DefaultMaxInterval = 1 * time.Second )
View Source
const ( ConnectionRunning = "running" ConnectionIntializing = "initializing" 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 DetachConnection ¶
func DetachConnection(ctx api.StreamContext, id string, props map[string]interface{}) error
func DropNameConnection ¶
func DropNameConnection(ctx api.StreamContext, selId string) error
func GetAllConnectionStatus ¶
func GetAllConnectionStatus(ctx api.StreamContext) map[string]ConnectionStatus
func GetAllConnectionsID ¶
func GetAllConnectionsID() []string
func GetConnectionRef ¶
func InitConnectionManager ¶
func InitConnectionManager()
func InitConnectionManager4Test ¶
func InitConnectionManager4Test() error
func InitMockTest ¶
func InitMockTest()
func IsConnectionExists ¶
func NewExponentialBackOff ¶
func NewExponentialBackOff() *backoff.ExponentialBackOff
func PingConnection ¶
func PingConnection(ctx api.StreamContext, id string) error
func ReloadConnection ¶
func ReloadConnection() error
Types ¶
type ConnWrapper ¶
type ConnWrapper struct { ID string // contains filtered or unexported fields }
func CreateNamedConnection ¶
func CreateNamedConnection(ctx api.StreamContext, id, typ string, props map[string]any) (*ConnWrapper, error)
func FetchConnection ¶
func FetchConnection(ctx api.StreamContext, id, typ string, props map[string]interface{}) (*ConnWrapper, error)
func (*ConnWrapper) IsInitialized ¶
func (cw *ConnWrapper) IsInitialized() bool
func (*ConnWrapper) SetConn ¶
func (cw *ConnWrapper) SetConn(conn modules.Connection, err error)
func (*ConnWrapper) Wait ¶
func (cw *ConnWrapper) Wait() (modules.Connection, error)
type ConnectionManager ¶
type ConnectionMeta ¶
type ConnectionStatus ¶
Click to show internal directories.
Click to hide internal directories.