sat

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgTypeSuborbitalResult = "suborbital.result"
)

Variables

View Source
var SatDotVersion = "v0.1.4"

Functions

func NewAuthToken

func NewAuthToken(token string) system.Credential

func SetupTracing

func SetupTracing(config options.TracerConfig, logger *vlog.Logger) (*trace.TracerProvider, error)

SetupTracing configure open telemetry to be used with otel exporter. Returns a tracer closer func and an error.

Types

type AuthToken

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

func (AuthToken) Scheme

func (a AuthToken) Scheme() string

func (AuthToken) Value

func (a AuthToken) Value() string

type Config

type Config struct {
	RunnableArg     string
	JobType         string
	PrettyName      string
	Module          *tenant.Module
	Tenant          string
	CapConfig       capabilities.CapabilityConfig
	Connections     []tenant.Connection
	Port            int
	ControlPlaneUrl string
	EnvToken        string
	Logger          *vlog.Logger
	ProcUUID        string
	TracerConfig    satOptions.TracerConfig
	MetricsConfig   satOptions.MetricsConfig
}

func ConfigFromArgs

func ConfigFromArgs() (*Config, error)

func ConfigFromRunnableArg

func ConfigFromRunnableArg(runnableArg string) (*Config, error)

type Metrics

type Metrics struct {
	FunctionExecutions       syncint64.Counter
	FailedFunctionExecutions syncint64.Counter
	FunctionTime             syncint64.Histogram
}

type Sat

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

Sat is a sat server with annoyingly terse field names (because it's smol)

func New

func New(config *Config, traceProvider trace.TracerProvider, mtx metrics.Metrics) (*Sat, error)

New initializes Reactr, Vektor, and Grav in a Sat instance if config.UseStdin is true, only Reactr will be created if traceProvider is nil, the default NoopTraceProvider will be used

func (*Sat) Exec

func (s *Sat) Exec(input []byte) (*request.CoordinatedResponse, error)

Exec takes input bytes, executes the loaded Runnable, and returns the result

func (*Sat) Shutdown

func (s *Sat) Shutdown() error

func (*Sat) Start

func (s *Sat) Start(ctx context.Context) error

Start starts Sat's Vektor server and Grav discovery

type WorkerMetricsResponse

type WorkerMetricsResponse struct {
	Scheduler scheduler.ScalerMetrics `json:"scheduler"`
}

Directories

Path Synopsis
Package metrics provides a factory function that resolves to either a none, or an otel implementation of metrics code.
Package metrics provides a factory function that resolves to either a none, or an otel implementation of metrics code.

Jump to

Keyboard shortcuts

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