service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(app Service)

Run runs the application

Types

type BaseService

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

BaseService implements Service

func NewBaseService

func NewBaseService(cfg config.Configurator) *BaseService

NewBaseService creates a BaseApplication

func (*BaseService) AddComponent

func (app *BaseService) AddComponent(com component.Component) component.Component

func (*BaseService) ID

func (app *BaseService) ID() string

ID implements Application.Service ID method

func (*BaseService) Init

func (app *BaseService) Init() error

Init implements Application.Service Init method

func (*BaseService) Name

func (app *BaseService) Name() string

Name implements Application.Service Name method

func (*BaseService) SetID

func (app *BaseService) SetID(id string)

SetID sets id of application

func (*BaseService) SetName

func (app *BaseService) SetName(name string)

SetName sets name of application

func (*BaseService) Shutdown

func (app *BaseService) Shutdown()

Shutdown implements Application.Service Shutdown method

func (*BaseService) Start

func (app *BaseService) Start()

Start implements Application.Service Start method

func (*BaseService) Update

func (app *BaseService) Update(now time.Time, dt time.Duration)

Update updates per frame

type Service

type Service interface {
	// ID returns id of service
	ID() string
	// Name of service
	Name() string
	// Init initializes the service
	Init() error
	// Start starts the service
	Start() error
	// Shutdown shutdowns the service
	Shutdown() error
}

Service represents a process

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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