Documentation
¶
Overview ¶
Package service models services and provides HTTP handlers for service operations used by the daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleService ¶
type HandleService interface {
CreateService(ctx context.Context, svc *store.Service) (store.Service, error)
GetService(ctx context.Context, id string) (*store.Service, error)
ListServices(ctx context.Context, id string, limit, offset int) ([]*store.Service, error)
UpdateService(ctx context.Context, id string, status store.Service) (*store.Service, error)
}
type ListServicesResponse ¶
type ServiceHandler ¶
type ServiceHandler struct {
// contains filtered or unexported fields
}
func NewServiceHandler ¶
func NewServiceHandler(servicer *Servicer, logger *shared.Logger) *ServiceHandler
func (*ServiceHandler) GetService ¶
func (h *ServiceHandler) GetService(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) ListServices ¶
func (h *ServiceHandler) ListServices(w http.ResponseWriter, r *http.Request)
func (*ServiceHandler) UpdateService ¶
func (h *ServiceHandler) UpdateService(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.