core

package
v0.0.0-...-949e811 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_MiniDevOps_core_config_proto protoreflect.FileDescriptor

Functions

func CreateObject

func CreateObject(v Server, config interface{}) (interface{}, error)

CreateObject creates a new object based on the given Galaxy instance and config. The Galaxy instance may be nil.

func RequireFeatures

func RequireFeatures(ctx context.Context, callback interface{}) error

func ServerType

func ServerType() interface{}

Types

type Config

type Config struct {
	Features []*any.Any `protobuf:"bytes,1,rep,name=features,proto3" json:"features,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetFeatures

func (x *Config) GetFeatures() []*any.Any

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Instance

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

func FromContext

func FromContext(ctx context.Context) *Instance

FromContext returns an Instance from the given context, or nil if the context doesn't contain one.

func MustFromContext

func MustFromContext(ctx context.Context) *Instance

MustFromContext returns an Instance from the given context, or panics if not present.

func New

func New(config *Config) (*Instance, error)

func (*Instance) AddFeature

func (i *Instance) AddFeature(feature features.Feature) error

AddFeature registers a feature into current Instance.

func (*Instance) Close

func (i *Instance) Close() error

func (*Instance) RequireFeatures

func (i *Instance) RequireFeatures(callback interface{}) error

RequireFeatures registers a callback, which will be called when all dependent features are registered. The callback must be a func(). All its parameters must be features.Feature.

func (*Instance) Start

func (i *Instance) Start() error

func (*Instance) Type

func (i *Instance) Type() interface{}

type Server

type Server interface {
	common.Runnable
}

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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