runtime

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

func ID

func ID(id string) Option

ID with service id.

func Loader

func Loader(loader ...loader.Loader) Option

Loader with service loader.

func Metadata

func Metadata(md map[string]string) Option

Metadata with service metadata.

func Name

func Name(name string) Option

Name with service name.

func Version

func Version(version string) Option

Version with service version.

type Options

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

Options configure runtime

type Runtime

type Runtime interface {
	// ID returns runtime ID
	ID() string
	// Name returns runtime name
	Name() string
	// Version returns runtime version
	Version() string
	// Metadata returns runtime metadata
	Metadata() map[string]string
	// Init initializes runtime
	Init(...Option) error
	// Start starts the runtime
	Start(ctx context.Context) error
	// Stop shuts down the runtime
	Stop(context.Context) error
	// String describes runtime
	String() string
}

Runtime is a service runtime manager

func NewRuntime

func NewRuntime(opts ...Option) Runtime

NewRuntime creates new local runtime and returns it

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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