Documentation ¶
Overview ¶
Package runtime is a service runtime manager
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOption ¶
type CreateOption func(o *CreateOptions)
func WithCommand ¶
func WithCommand(c string, args ...string) CreateOption
WithCommand specifies the command to execute
type CreateOptions ¶
type CreateOptions struct { // command to execute including args Command []string // Environment to configure Env []string // Log output Output io.Writer }
CreateOptions configure runtime services
type Event ¶ added in v1.15.0
type Event struct { // Type is event type Type EventType // Timestamp is event timestamp Timestamp time.Time // Service is the name of the service Service string // Version of the build Version string }
Event is notification event
type Notifier ¶ added in v1.15.0
type Notifier interface { // Notify publishes notification events Notify() (<-chan Event, error) // Close stops the notifier Close() error }
Notifier is an update notifier
type Option ¶ added in v1.15.0
type Option func(o *Options)
func WithNotifier ¶ added in v1.15.0
AutoUpdate enables micro auto-updates
type Options ¶ added in v1.15.0
type Options struct { // Notifier for updates Notifier Notifier }
Options configure runtime
type Runtime ¶
type Runtime interface { // Init initializes runtime Init(...Option) error // Registers a service Create(*Service, ...CreateOption) error // Remove a service Delete(*Service) error // Update the service in place Update(*Service) error // List the managed services List() ([]*Service, error) // starts the runtime Start() error // Shutdown the runtime Stop() error }
Runtime is a service runtime manager
var ( // DefaultRuntime is default micro runtime DefaultRuntime Runtime = NewRuntime() )
func NewRuntime ¶ added in v1.15.0
NewRuntime creates new local runtime and returns it
Directories ¶
Path | Synopsis |
---|---|
Package kubernetes implements kubernetes micro runtime
|
Package kubernetes implements kubernetes micro runtime |
Package packager creates a binary image.
|
Package packager creates a binary image. |
docker
Package docker builds docker images
|
Package docker builds docker images |
go
Package golang is a go package manager
|
Package golang is a go package manager |
Package process executes a binary
|
Package process executes a binary |
os
Package os runs processes locally
|
Package os runs processes locally |
service
|
|
Package source retrieves source code
|
Package source retrieves source code |
git
Package git provides a git source
|
Package git provides a git source |
go
Package golang is a source for Go
|
Package golang is a source for Go |
Click to show internal directories.
Click to hide internal directories.