server

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLPathSwagger     = "/swagger/*any"
	URLPathSwaggerDesc = "Swagger endpoint for docs"
)
View Source
const DefaultQuerySince = 30 * time.Minute
View Source
const URLPathComponents = "/components"

URLPathComponents is for getting the list of all gpud components

View Source
const URLPathComponentsCustomPlugins = "/plugins"
View Source
const URLPathComponentsTriggerCheck = "/components/trigger-check"
View Source
const URLPathComponentsTriggerTag = "/components/trigger-tag"

URLPathComponentsTriggerTag is for triggering components by tag

View Source
const URLPathEvents = "/events"

URLPathEvents is for getting the events of all gpud components

View Source
const URLPathHealthStatesSetHealthy = "/health-states/set-healthy"

URLPathHealthStatesSetHealthy is for setting components to healthy state

View Source
const URLPathHealthz = "/healthz"
View Source
const URLPathInfo = "/info"

URLPathInfo is for getting the information of all gpud components

View Source
const URLPathInjectFault = "/inject-fault"
View Source
const URLPathMachineInfo = "/machine-info"
View Source
const URLPathMetrics = "/metrics"

URLPathMetrics is for getting the metrics of all gpud components

View Source
const URLPathStates = "/states"

URLPathStates is for getting the states of all gpud components

Variables

View Source
var DefaultHealthz = Healthz{
	Status:  "ok",
	Version: "v1",
}
View Source
var DefaultSignalsToHandle = []os.Signal{
	unix.SIGTERM,
	unix.SIGINT,
	unix.SIGUSR1,
	unix.SIGPIPE,
}
View Source
var URLPathAdminPackages = path.Join(urlPathAdmin, urlPathPackages)

Functions

func HandleSignals added in v0.5.0

func HandleSignals(ctx context.Context, cancel context.CancelFunc, signals chan os.Signal, serverC chan ServerStopper, notifyStopping func(ctx context.Context) error) chan struct{}

HandleSignals handles signals and stops the server.

func WriteToken

func WriteToken(token string, fifoFile string) error

Types

type Healthz

type Healthz struct {
	Status  string `json:"status"`
	Version string `json:"version"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the gpud main daemon

func New

func New(ctx context.Context, auditLogger log.AuditLogger, config *lepconfig.Config, packageManager *gpudmanager.Manager) (_ *Server, retErr error)

func (*Server) Stop

func (s *Server) Stop()

func (*Server) WaitUntilMachineID added in v0.5.0

func (s *Server) WaitUntilMachineID(ctx context.Context)

type ServerStopper added in v0.5.0

type ServerStopper interface {
	Stop()
}

type SetHealthyStatesResponse added in v0.8.0

type SetHealthyStatesResponse struct {
	Code       int               `json:"code"`
	Message    string            `json:"message"`
	Successful []string          `json:"successful,omitempty"`
	Failed     map[string]string `json:"failed,omitempty"`
}

SetHealthyStatesResponse represents the response for setting healthy states

type UserToken added in v0.5.0

type UserToken struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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