Documentation
¶
Overview ¶
Package service models services and provides HTTP handlers for service operations used by the daemon.
Index ¶
- type HandleService
- type ServiceHandler
- func (h *ServiceHandler) DeleteService(w http.ResponseWriter, r *http.Request)
- func (h *ServiceHandler) GetService(w http.ResponseWriter, r *http.Request)
- func (h *ServiceHandler) IceService(w http.ResponseWriter, r *http.Request)
- func (h *ServiceHandler) ListServices(w http.ResponseWriter, r *http.Request)
- func (h *ServiceHandler) SleepService(w http.ResponseWriter, r *http.Request)
- func (h *ServiceHandler) WakeService(w http.ResponseWriter, r *http.Request)
- type Servicer
- type SvcState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleService ¶
type HandleService interface {
GetService(ctx context.Context, name string) (*store.Service, error)
ListServices(ctx context.Context, userID string, limit, offset int) ([]*store.Service, error)
DeleteService(ctx context.Context, name string) error
SleepService(name string) error
WakeService(name string) error
IceService(name string) error
}
type ServiceHandler ¶
type ServiceHandler struct {
// contains filtered or unexported fields
}
func NewServiceHandler ¶
func NewServiceHandler(servicer *Servicer, logger *shared.Logger) *ServiceHandler
func (*ServiceHandler) DeleteService ¶ added in v0.5.0
func (h *ServiceHandler) DeleteService(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) GetService ¶
func (h *ServiceHandler) GetService(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) IceService ¶ added in v0.6.22
func (h *ServiceHandler) IceService(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) ListServices ¶
func (h *ServiceHandler) ListServices(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) SleepService ¶ added in v0.6.22
func (h *ServiceHandler) SleepService(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) WakeService ¶ added in v0.6.22
func (h *ServiceHandler) WakeService(w http.ResponseWriter, r *http.Request)
type Servicer ¶
type Servicer struct {
// contains filtered or unexported fields
}
func NewServicer ¶
func NewServicer(c *shared.Config, l *shared.Logger, s store.ServiceStore, a HandleService) *Servicer
Click to show internal directories.
Click to hide internal directories.