core

package module
v0.0.0-...-7b795ad Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 7 Imported by: 0

README

core-app-linux-sys

Core of golang app for linux system service

Go package of сore app for linux system service

This library includes some packages and architecture skeleton for writing go-app as linux system service.

Install

go get github.com/andreyAKor/core-app-linux-sys

Example

See folder with example app code.

For fast build example app code, you must install GB:

go get github.com/constabulary/gb/...

go to example folder:

cd ~/go-lang-projects/core-app-linux-sys/example/

run vendor fetches:

gb vendor restore

and run build app:

gb build

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Init(configuration interface{})
	Run()
}

Интерфейс приложения

type Program

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

Структура программы

func (*Program) Start

func (p *Program) Start(s service.Service) error

Обработчик старта сервиса

func (*Program) Stop

func (p *Program) Stop(s service.Service) error

Обработчик остановки сервиса

type Service

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

Структура службы

func NewService

func NewService(configName string, configuration interface{}, app App) *Service

Конструктор

func (*Service) Run

func (s *Service) Run() error

Запуск службы

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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