MCPcopy Create free account
hub / github.com/cloudbase/garm / InstanceParams

Function InstanceParams

auth/context.go:115–126  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

113}
114
115func InstanceParams(ctx context.Context) (params.Instance, error) {
116 elem := ctx.Value(instanceParams)
117 if elem == nil {
118 return params.Instance{}, runnerErrors.ErrNotFound
119 }
120
121 instanceParams, ok := elem.(params.Instance)
122 if !ok {
123 return params.Instance{}, runnerErrors.ErrNotFound
124 }
125 return instanceParams, nil
126}
127
128func SetInstanceRunnerStatus(ctx context.Context, val params.RunnerStatus) context.Context {
129 return context.WithValue(ctx, instanceRunnerStatus, val)

Callers 10

validateInstanceStateFunction · 0.92
RecordAgentHeartbeatMethod · 0.92
GetAgentJWTTokenMethod · 0.92
AgentHandlerMethod · 0.92
MiddlewareMethod · 0.85
MiddlewareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected