connectors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package connectors adapts independent integrations to the SDK lifecycle It contains no feature imports, so executables retain dependency isolation

Index

Constants

This section is empty.

Variables

View Source
var Boolean = settings.Bool
View Source
var Number = settings.Number
View Source
var String = settings.String

Functions

func Clamp

func Clamp(v, lo, hi float64) float64

Clamp a value to inclusive numeric limits

func Factory

func Factory(options Options) engine.Factory

Construct the authoring factory for a service connector

func JSONInputs

func JSONInputs(s map[string]any, key string) (map[string]any, error)

Read and validate an object-valued JSON settings field

func SingleResource

func SingleResource(map[string]any) string

SingleResource supplies the connection-wide identity for status samples

Types

type Choice

type Choice struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Kind string `json:"kind"`
}

func NoDiscovery

func NoDiscovery(context.Context, map[string]any) ([]Choice, error)

Return no discovered choices for connectors without discovery

type Driver

type Driver interface {
	Key(map[string]any) string
	Read(context.Context, map[string]any) (any, error)
	Command(context.Context, string, map[string]any, int) (Outcome, error)
	Discover(context.Context, map[string]any) ([]Choice, error)
	Display(any, string, map[string]any) string
	Close()
}

type HTTP

type HTTP = httpclient.Service

type HTTPError

type HTTPError = httpclient.HTTPError

type Options

type Options struct {
	ReadTimeout      time.Duration
	CommandTimeout   time.Duration
	AuthorizeTimeout time.Duration
	Definition       engine.Definition
	Interval         time.Duration
	Tick             time.Duration
	Visuals          map[string]engine.Visual
	New              func(chan<- struct{}) Driver
	Dial             bool
	DialActions      []string
	SharedKeys       []string
}

type Outcome

type Outcome struct {
	Message string
	Value   any
}

type Runner

type Runner func(context.Context, string, ...string) (string, error)

type Runtime

type Runtime struct {
	*engine.Engine
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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