Documentation ¶
Overview ¶
Package release works with the metadata of execution releases.
It answers questions about current release version and which binary to download for which os and architecture.
Index ¶
- Constants
- Variables
- func Handler(cfg HandlerConfig) func(c *gin.Context)
- type HandlerConfig
- type List
- func (c *List) HealthChecks() (_ string, ready, live func(ctx context.Context) error)
- func (c *List) Latest() string
- func (c *List) LatestFor(releaseType string) string
- func (c *List) Lookup(ctx context.Context, req Requirements) (resp *Release, err error)
- func (c *List) Run(ctx context.Context) error
- type Release
- type Requirements
Constants ¶
View Source
const (
DefaultReleaseType = "release"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrListVersionNotReady = errors.New("list version not ready") )
Functions ¶
func Handler ¶
func Handler(cfg HandlerConfig) func(c *gin.Context)
Types ¶
type HandlerConfig ¶
type HandlerConfig struct { List *List // Resolver is optional Resolver releaseTypeResolver }
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) HealthChecks ¶
type Requirements ¶
type Requirements struct { Version string `json:"version"` Platform string `json:"os"` Arch string `json:"arch"` }
func (*Requirements) Validate ¶
func (d *Requirements) Validate() error
Click to show internal directories.
Click to hide internal directories.