Documentation ¶
Index ¶
- func Standalone(image string) func(*API) error
- func WithAuth(auth *types.AuthConfig) func(*API) error
- func WithCacheStore(s string) func(*API) error
- func WithCleanupInterval(s string) func(*API) error
- func WithDNSField(s string) func(*API) error
- func WithDefaultImage(s string) func(*API) error
- func WithListeningAddress(s string) func(*API) error
- func WithMagicDNS(s string) func(*API) error
- func WithMaxSize(s string) func(*API) error
- func WithPoolSize(i int) func(*API) error
- func WithWhitelist(s ...string) func(*API) error
- func WithWorkers(i int) func(*API) error
- type API
- type EchoOption
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Standalone ¶
Standalone sets the standalone image to serve requests from.
func WithAuth ¶
func WithAuth(auth *types.AuthConfig) func(*API) error
WithAuth specify an authentication which is used to perform image pulls. This is mostly required to access to private registries or either workaround Pull rate limits
func WithCacheStore ¶
WithCacheStore sets the cache store where all container images will be stored
func WithCleanupInterval ¶
WithCleanupInterval sets the cleanup interval that triggers a cache cleanup The cache gets periodically cleaned up at the interval provided from the images contained in it The interval is a string and specifies a duration, e.g. 10m, 2h, 12h
func WithDNSField ¶
WithDNSField sets the DNS TXT fields which containerbay will use to resolve the container image to host the website
func WithDefaultImage ¶
WithDefaultImage sets the DefaultImage which will be used as fallback
func WithListeningAddress ¶
WithListeningAddress sets the API listening address port in the ip:port form. To bind to all IPs, just set the port ( e.g. ":8080" )
func WithMagicDNS ¶
WithMagicDNS sets the magic dns domain used to query the images from e.g. to allow requests like http://registry.org.image.tag.magicdns
func WithMaxSize ¶
WithMaxSize specifies a max size of the images to be served. Images bigger than the specified size are not served and an error to the client is returned Valid values are e.g. 10MB, 2GB, etc.
func WithPoolSize ¶
WithPoolSize specify a size for the queue of the worker pool
func WithWhitelist ¶
WithWhitelist adds a list of regexes to be whiteliste of the images that can be served. Those that doesn't match regexes are refused
func WithWorkers ¶
WithWorkers specifies the number of running workers that will download images in parallel
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API returns a new containerbay instance
func (*API) Start ¶
func (a *API) Start(opts ...EchoOption) error
Start starts the API with the given EchoOption
type EchoOption ¶
type EchoOption func(e *echo.Echo) error
EchoOption is a generic handler which mutates the underlying Echo instance