udf

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 9 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Functions map[string]FunctionConfig `toml:"functions"`
}

func NewConfig

func NewConfig() Config

func (Config) Validate

func (c Config) Validate() error

type Diagnostic added in v1.4.0

type Diagnostic interface {
	LoadedUDFInfo(udf string)

	WithUDFContext() udf.Diagnostic
}

type FunctionConfig

type FunctionConfig struct {
	// General config
	Timeout toml.Duration `toml:"timeout"`

	// Config for connecting to domain socket
	Socket string `toml:"socket"`

	// Config for creating process
	Prog string            `toml:"prog"`
	Args []string          `toml:"args"`
	Env  map[string]string `toml:"env"`
}

func (FunctionConfig) Validate added in v0.13.0

func (c FunctionConfig) Validate() error

type Service

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

func NewService

func NewService(c Config, d Diagnostic) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Create added in v0.13.0

func (s *Service) Create(
	name, taskID, nodeID string,
	d udf.Diagnostic,
	abortCallback func(),
) (udf.Interface, error)

func (*Service) Info added in v0.13.0

func (s *Service) Info(name string) (udf.Info, bool)

func (*Service) List added in v0.13.0

func (s *Service) List() []string

func (*Service) Open

func (s *Service) Open() error

func (*Service) Refresh added in v0.13.0

func (s *Service) Refresh(name string) error

Jump to

Keyboard shortcuts

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