Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
Profiler bool `json:"profiler" yaml:"profiler"`
Prefix string `json:"prefix" yaml:"prefix"`
}
structure with configuration for worker
type Info ¶
type Info struct {
App string `json:"app"`
Version string `json:"version"`
Tag string `json:"tag"`
Build string `json:"build"`
}
DEPRECATED structure with info about service
type InfoWorker ¶
type InfoWorker struct {
api.Server
Info Info
Config Conf
// contains filtered or unexported fields
}
func GetInfoWorker ¶
func GetInfoWorker(cfg Conf, ctx context.Context, info Info) *InfoWorker
GetInfoWorker returns initialized info worker struct. !Context must contain pointer to worker chief!
func (*InfoWorker) GetInfoRouter ¶
GetInfoRouter returns workers api
func (*InfoWorker) Version ¶
func (iw *InfoWorker) Version(w http.ResponseWriter, r *http.Request)
Version is a handler which responses with Info structure
func (*InfoWorker) Workers ¶
func (iw *InfoWorker) Workers(w http.ResponseWriter, r *http.Request)
Workers is a handler which responses with JSON with all workers in parent chief
Click to show internal directories.
Click to hide internal directories.