service

package
v0.4.1-beta.13 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 6 Imported by: 0

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 ListServicesResponse struct {
	Services []*store.Service `json:"services"`
	Total    int              `json:"total"`
}

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
}

type SvcState

type SvcState string
const (
	SvcRunning SvcState = "running"
	SvcStopped SvcState = "stopped"
	SvcUnknown SvcState = "unknown"
)

Jump to

Keyboard shortcuts

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