svcm

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSvcDb

func GetSvcDb(logger *zerolog.Logger) (*db.Storage, error)

func IsDaemonRunning

func IsDaemonRunning(port int) (bool, error)

func NewHttpClient

func NewHttpClient() *http.Client

func SigRun

func SigRun(logger *zerolog.Logger, subscribers []chan os.Signal, done chan string, server *http.Server)

Run catches and handles signals

func StopProcess

func StopProcess(pid int) error

Types

type Daemon

type Daemon struct {
	Logger *zerolog.Logger
}

func (*Daemon) KillDaemon

func (d *Daemon) KillDaemon(pidStr string) error

type Server

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

func NewServer

func NewServer(logger *zerolog.Logger) Server

func (*Server) Run

func (s *Server) Run()

type StatusResponse

type StatusResponse struct {
	Status  bool   `json:"status"`
	Version string `json:"version"`
	Commit  string `json:"commit"`
}

func GetDaemonStatus

func GetDaemonStatus(port int) (*StatusResponse, error)

Jump to

Keyboard shortcuts

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