package discovery
import "github.com/appc/spec/discovery"
Package discovery contains an experimental implementation of the Image Discovery section of the appc specification.
Index ¶
- func DiscoverEndpoints(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error)
- func DiscoverPublicKeys(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error)
- func DiscoverWalk(app App, insecure bool, discoverFn DiscoverWalkFunc) (err error)
- type ACIEndpoint
- type App
- func NewApp(name string, labels map[types.ACName]string) (*App, error)
- func NewAppFromString(app string) (*App, error)
- func (a *App) String() string
- type DiscoverWalkFunc
- type Endpoints
- type FailedAttempt
Functions ¶
func DiscoverEndpoints ¶
func DiscoverEndpoints(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error)
DiscoverEndpoints will make HTTPS requests to find the ac-discovery meta tags and optionally will use HTTP if insecure is set. It will not give up until it has exhausted the path or found an image discovery.
func DiscoverPublicKeys ¶
func DiscoverPublicKeys(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error)
DiscoverPublicKey will make HTTPS requests to find the ac-public-keys meta tags and optionally will use HTTP if insecure is set. It will not give up until it has exhausted the path or found an public key.
func DiscoverWalk ¶
func DiscoverWalk(app App, insecure bool, discoverFn DiscoverWalkFunc) (err error)
DiscoverWalk will make HTTPS requests to find discovery meta tags and optionally will use HTTP if insecure is set. Based on the response of the discoverFn it will continue to recurse up the tree.
Types ¶
type ACIEndpoint ¶
type App ¶
func NewApp ¶
func NewAppFromString ¶
NewAppFromString takes a command line app parameter and returns a map of labels.
Example app parameters:
example.com/reduce-worker:1.0.0 example.com/reduce-worker,channel=alpha,label=value
func (*App) String ¶
String returns the URL-like image name
type DiscoverWalkFunc ¶
DiscoverWalkFunc can stop a DiscoverWalk by returning non-nil error.
type Endpoints ¶
type Endpoints struct { ACIEndpoints []ACIEndpoint Keys []string }
func (*Endpoints) Append ¶
type FailedAttempt ¶
FailedAttempt represents a failed discovery attempt. This is for debugging and user feedback.
Source Files ¶
discovery.go doc.go http.go parse.go
- Version
- v0.5.2
- Published
- May 18, 2015
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 45 minutes ago –
Tools for package owners.