Versions in this module Expand all Collapse all v0 v0.0.2 Aug 3, 2022 v0.0.1 Aug 2, 2022 Changes in this version + var DefaultName = "go.micro.runtime" + var DefaultRuntime Runtime = NewRuntime() + var ErrAlreadyExists = errors.New("already exists") + type CreateOption func(o *CreateOptions) + func CreateContext(ctx context.Context) CreateOption + func CreateImage(img string) CreateOption + func CreateNamespace(ns string) CreateOption + func CreateType(t string) CreateOption + func WithArgs(args ...string) CreateOption + func WithCommand(cmd ...string) CreateOption + func WithEnv(env []string) CreateOption + func WithOutput(out io.Writer) CreateOption + func WithRetries(retries int) CreateOption + type CreateOptions struct + Args []string + Command []string + Context context.Context + Env []string + Image string + Namespace string + Output io.Writer + Retries int + Type string + type DeleteOption func(o *DeleteOptions) + func DeleteContext(ctx context.Context) DeleteOption + func DeleteNamespace(ns string) DeleteOption + type DeleteOptions struct + Context context.Context + Namespace string + type Event struct + ID string + Options *CreateOptions + Service *Service + Timestamp time.Time + Type EventType + type EventType int + const Create + const Delete + const Update + func (t EventType) String() string + type LogRecord struct + Message string + Metadata map[string]string + type LogStream interface + Chan func() chan LogRecord + Error func() error + Stop func() error + type LogsOption func(o *LogsOptions) + func LogsContext(ctx context.Context) LogsOption + func LogsCount(count int64) LogsOption + func LogsNamespace(ns string) LogsOption + func LogsStream(stream bool) LogsOption + type LogsOptions struct + Context context.Context + Count int64 + Namespace string + Stream bool + type Option func(o *Options) + func WithClient(c client.Client) Option + func WithImage(t string) Option + func WithScheduler(n Scheduler) Option + func WithSource(src string) Option + func WithType(t string) Option + type Options struct + Client client.Client + Image string + Scheduler Scheduler + Source string + Type string + type ReadOption func(o *ReadOptions) + func ReadContext(ctx context.Context) ReadOption + func ReadNamespace(ns string) ReadOption + func ReadService(service string) ReadOption + func ReadType(t string) ReadOption + func ReadVersion(version string) ReadOption + type ReadOptions struct + Context context.Context + Namespace string + Service string + Type string + Version string + type Runtime interface + Create func(*Service, ...CreateOption) error + Delete func(*Service, ...DeleteOption) error + Init func(...Option) error + Logs func(*Service, ...LogsOption) (LogStream, error) + Read func(...ReadOption) ([]*Service, error) + Start func() error + Stop func() error + String func() string + Update func(*Service, ...UpdateOption) error + func NewRuntime(opts ...Option) Runtime + type Scheduler interface + Close func() error + Notify func() (<-chan Event, error) + type Service struct + Metadata map[string]string + Name string + Source string + Version string + type UpdateOption func(o *UpdateOptions) + func UpdateContext(ctx context.Context) UpdateOption + func UpdateNamespace(ns string) UpdateOption + type UpdateOptions struct + Context context.Context + Namespace string