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 = o11y.NewWarning("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" form:"version"` Platform string `json:"os" form:"os"` Arch string `json:"arch" form:"arch"` }
func (*Requirements) QueryParams ¶
func (d *Requirements) QueryParams() (params map[string]string)
QueryParams builds a map[string]string of query params which correspond to the required query params for the release handler.
func (*Requirements) Validate ¶
func (d *Requirements) Validate() error
Click to show internal directories.
Click to hide internal directories.