Documentation ¶
Overview ¶
Package publish defines methods for publishing a v1.Image reference and returning the published digest for embedding back into a Kubernetes yaml.
Index ¶
- Constants
- type Interface
- func MultiPublisher(publishers ...Interface) Interface
- func NewCaching(inner Interface) (Interface, error)
- func NewDaemon(namer Namer, tags []string) Interface
- func NewDefault(base string, options ...Option) (Interface, error)
- func NewKindPublisher(namer Namer, tags []string) Interface
- func NewLayout(path string) (Interface, error)
- func NewTarball(file, base string, namer Namer, tags []string) Interface
- type LayoutPublisher
- type Namer
- type Option
Constants ¶
const (
// KindDomain is a sentinel "registry" that represents side-loading images into kind nodes.
KindDomain = "kind.local"
)
const (
// LocalDomain is a sentinel "registry" that represents side-loading images into the daemon.
LocalDomain = "ko.local"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Publish uploads the given build.Result to a registry incorporating the // provided string into the image's repository name. Returns the digest // of the published image. Publish(build.Result, string) (name.Reference, error) // Close exists for the tarball implementation so we can // do the whole thing in one write. Close() error }
Interface abstracts different methods for publishing images.
func MultiPublisher ¶
MultiPublisher creates a publisher that publishes to all the provided publishers, similar to the Unix tee(1) command.
When calling Publish, the name.Reference returned will be the return value of the last publisher passed to MultiPublisher (last one wins).
func NewCaching ¶
NewCaching wraps the provided publish.Interface in an implementation that shares publish results for a given path until the passed image object changes.
func NewDaemon ¶
NewDaemon returns a new publish.Interface that publishes images to a container daemon.
func NewDefault ¶
NewDefault returns a new publish.Interface that publishes references under the provided base repository using the default keychain to authenticate and the default naming scheme.
func NewKindPublisher ¶
NewKindPublisher returns a new publish.Interface that loads images into kind nodes.
type LayoutPublisher ¶
type LayoutPublisher struct {
// contains filtered or unexported fields
}
func (*LayoutPublisher) Close ¶
func (l *LayoutPublisher) Close() error
type Namer ¶
Namer is a function from a supported import path to the portion of the resulting image name that follows the "base" repository name.
type Option ¶
type Option func(*defaultOpener) error
Option is a functional option for NewDefault.
func WithAuth ¶
func WithAuth(auth authn.Authenticator) Option
WithAuth is a functional option for overriding the default authenticator on a default publisher.
func WithAuthFromKeychain ¶
WithAuthFromKeychain is a functional option for overriding the default authenticator on a default publisher using an authn.Keychain
func WithNamer ¶
WithNamer is a functional option for overriding the image naming behavior in our default publisher.
func WithTransport ¶
func WithTransport(t http.RoundTripper) Option
WithTransport is a functional option for overriding the default transport on a default publisher.