Help us shape the future of Go! Take the 2026 Go Developer Survey

service

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Version     string   `json:"version,omitempty"`
	Process     string   `json:"process,omitempty"`
	Command     string   `json:"command,omitempty"`
	Requires    []string `json:"requires,omitempty"`
	After       []string `json:"after,omitempty"`
	Restart     string   `json:"restart,omitempty"`
	WorkDir     string   `json:"workdir,omitempty"`
	Args        []string `json:"args,omitempty"`
	LogError    string   `json:"error,omitempty"`
	LogOutput   string   `json:"output,omitempty"`
	User        string   `json:"user,omitempty"`
	Group       string   `json:"group,omitempty"`
	daemon.Daemon
	// contains filtered or unexported fields
}

Service embedded daemon

{
	"name": "Server for receiving RFID",
	"description": "Server for receiving RFID",
	"version": "0.9.2",
	"restart": "on-failure",
	"requires": ["servers.rfid_server"],
	"after": ["servers.rfid_server"],
	"error": "/var/log/test.err"
	"output": "/var/log/test.log"
	"process": "servers.rfid_client",
	"args": ["192.168.1.192", 6000],
 "user": "root",
 "group": "root"
}

func Load

func Load(name string, input []byte) (*Service, error)

Load load the service config

func (*Service) Install

func (service *Service) Install() (string, error)

Install service

func (*Service) SetTemplate

func (service *Service) SetTemplate() error

SetTemplate sets service config template

Jump to

Keyboard shortcuts

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