service

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(o ...Option) error

Start an rpc service. By default the package scope Start will run all default services to provide with a working oCIS instance.

Types

type Log

type Log struct {
	Pretty bool
}

Log configures a structure logger.

type Option

type Option func(o *Options)

Option represents an option.

func WithConfig

func WithConfig(cfg *config.Config) Option

WithConfig sets Controller config.

func WithLogPretty

func WithLogPretty(pretty bool) Option

WithLogPretty sets Controller config.

type Options

type Options struct {
	Log    *Log
	Config *config.Config
}

Options are the configurable options for a Service.

func NewOptions

func NewOptions() *Options

NewOptions returns a new Options struct.

type Service

type Service struct {
	Supervisor       *suture.Supervisor
	ServicesRegistry serviceFuncMap
	Delayed          serviceFuncMap
	Log              log.Logger
	// contains filtered or unexported fields
}

Service represents a RPC service.

func NewService

func NewService(options ...Option) (*Service, error)

NewService returns a configured service with a controller and a default logger. When used as a library, flags are not parsed, and in order to avoid introducing a global state with init functions calls are done explicitly to loadFromEnv(). Since this is the public constructor, options need to be added, at the moment only logging options are supported in order to match the running OwnCloud services structured log.

func (*Service) List

func (s *Service) List(args struct{}, reply *string) error

List running processes for the Service Controller.

Jump to

Keyboard shortcuts

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