cmd

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 42 Imported by: 0

Documentation

Overview

Package cmd provides all the commands

Package cmd provides a service command

Index

Constants

View Source
const (
	ServiceModeOS        serviceMode = "os"
	ServiceModeContainer serviceMode = "container"
	ServiceModePodman    serviceMode = "podman"
	ServiceModeDocker    serviceMode = "docker"
)

Variables

This section is empty.

Functions

func FuncDescription added in v0.0.12

func FuncDescription(f interface{}) (desc string)

Get description of a func

func FuncName added in v0.0.12

func FuncName(f interface{}) string

Get the name of a func (with package path)

func FuncPathAndName added in v0.0.12

func FuncPathAndName(f interface{}) string

Get the name and path of a func

func NewFakeGRPCServer added in v0.0.11

func NewFakeGRPCServer() gRPCServer

NewFakeGRPCServer creates a fake gRPC server

func NewRootCmd added in v0.0.5

func NewRootCmd(execer fakeruntime.Execer, gRPCServer gRPCServer,
	httpServer server.HTTPServer) (c *cobra.Command)

NewRootCmd creates the root command

Types

type Action added in v0.0.13

type Action string
const (
	ActionInstall   Action = "install"
	ActionUninstall Action = "uninstall"
	ActionStart     Action = "start"
	ActionStop      Action = "stop"
	ActionRestart   Action = "restart"
	ActionStatus    Action = "status"
)

func (Action) All added in v0.0.13

func (a Action) All() []Action

type Service added in v0.0.12

type Service interface {
	Start() (string, error)     // start the service
	Stop() (string, error)      // stop the service gracefully
	Restart() (string, error)   // restart the service gracefully
	Status() (string, error)    // status of the service
	Install() (string, error)   // install the service
	Uninstall() (string, error) // uninstall the service
}

Service is the interface of service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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