api

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseJson

func ResponseJson(w http.ResponseWriter, d interface{})

Types

type API

type API struct {
	Config  *httprism.Config
	Version *Version
}

func NewAPI

func NewAPI(conf *httprism.Config, ver *Version) *API

func (*API) ListenAndServe

func (api *API) ListenAndServe() error

type App

type App struct {
	Name         string `json:"name,omitempty"`
	Host         string `json:"host,omitempty"`
	Address      string `json:"address,omitempty"`
	Pid          int    `json:"pid,omitempty"`
	ProcessState string `json:"state,omitempty"`
}

func NewApp

func NewApp(d *httprism.App) *App

type AppInfo

type AppInfo struct {
	*httprism.Config
}

func (*AppInfo) ServeHTTP

func (a *AppInfo) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Apps

type Apps struct {
	*httprism.Config
}

func (*Apps) ServeHTTP

func (a *Apps) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Remote

type Remote struct {
	Host string
}

func NewRemote

func NewRemote(host string) *Remote

func (*Remote) Apps

func (r *Remote) Apps() (map[string]App, error)

func (*Remote) FindProcess

func (r *Remote) FindProcess(host string) (*os.Process, error)

func (*Remote) Get

func (r *Remote) Get(path string, v interface{}) (err error)

func (*Remote) Kill

func (r *Remote) Kill(host string) error

func (*Remote) Restart

func (r *Remote) Restart(host string) error

func (*Remote) Start

func (r *Remote) Start(host string) error

func (*Remote) Version

func (r *Remote) Version() (*Version, error)

type Version

type Version struct {
	Version   string `json:"version,omitempty"   field:"Version,omitempty"`
	Sum       string `json:"sum,omitempty"       field:"Checksum,omitempty"`
	GoVersion string `json:"goversion,omitempty" field:"Go Vision,omitempty"`
	Revision  string `json:"revision,omitempty"  field:"Git commit,omitempty"`
}

func (*Version) ServeHTTP

func (v *Version) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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