Documentation
¶
Overview ¶
Package admission contains API for writing admission plugins.
Index ¶
Constants ¶
View Source
const ProtocolVersion = 1
ProtocolVersion will change if we have backward-incompatible changes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
Handler handles one admission request.
Called in a separate internal goroutine. It should return a grpc status error. To decide it can use the given `info` to fetch additional data about the package instance.
type InstanceInfo ¶
type InstanceInfo interface { // VisitMetadata visits metadata entries attached to the package instance. // // Either visits all metadata or only entries with requested keys. Visits // entries in order of their registration time (the most recent first). // Fetches them in pages of `pageSize`. If `pageSize` is negative or zero, // uses some default size. // // Calls `cb` for each visited entry until all entries are successfully // visited or the callback returns false. Returns an error if the RPC to // the CIPD backend fails. VisitMetadata(ctx context.Context, keys []string, pageSize int, cb func(md *api.InstanceMetadata) bool) error }
InstanceInfo fetches additional information about a package instance being checked for admission by the handler.
Click to show internal directories.
Click to hide internal directories.