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 ¶
Types ¶
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) WaitUntilMachineID ¶ added in v0.5.0
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
Click to show internal directories.
Click to hide internal directories.