Documentation
¶
Index ¶
- Constants
- type BinaryProvider
- type BuildOptions
- type DaemonImageSaver
- type DefaultImageDownloader
- type DownloadBinaryProvider
- type FileSystem
- type ImageBuilder
- func (b *ImageBuilder) Build(ctx context.Context, opts BuildOptions) (v1.Image, error)
- func (b *ImageBuilder) BuildMultiArch(ctx context.Context, opts MultiArchBuildOptions) (v1.ImageIndex, error)
- func (b *ImageBuilder) Save(ctx context.Context, img v1.Image, ref string) error
- func (b *ImageBuilder) SaveIndex(ctx context.Context, idx v1.ImageIndex, ref string) error
- type ImageDownloader
- type ImageSaver
- type MultiArchBuildOptions
- type OSFileSystem
- type RegistryImageSaver
Constants ¶
const ( ImageTitleLabel = "org.opencontainers.image.title" ImageDescriptionLabel = "org.opencontainers.image.description" ImageCreatedLabel = "org.opencontainers.image.created" ImageRefNameLabel = "org.opencontainers.image.ref.name" ImageVersionLabel = "org.opencontainers.image.version" McpServerNameLabel = "io.modelcontextprotocol.server.name" )
various standard oci labels
const DefaultBaseImage = "registry.access.redhat.com/ubi9/ubi-minimal:latest"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryProvider ¶
type BinaryProvider interface {
ExtractServerBinary(platform *v1.Platform) ([]byte, fs.FileInfo, error)
}
BinaryProvider interface for accessing server binaries
type BuildOptions ¶
type BuildOptions struct {
Platform *v1.Platform // Target platform (linux/amd64, etc.)
BaseImage string // Base image reference
MCPToolDefinitionsPath string // path to the MCP file
MCPServerConfigPath string // path to the MCP server configuration file
ImageTag string // output image tag
}
func (*BuildOptions) SetDefaults ¶
func (o *BuildOptions) SetDefaults()
type DaemonImageSaver ¶
type DaemonImageSaver struct{}
DaemonImageSaver implements ImageSaver for saving to local container engine
func (*DaemonImageSaver) SaveImageIndex ¶ added in v0.1.1
func (d *DaemonImageSaver) SaveImageIndex(ctx context.Context, idx v1.ImageIndex, ref string) error
type DefaultImageDownloader ¶
type DefaultImageDownloader struct{}
DefaultImageDownloader implements ImageDownloader using go-containerregistry
type DownloadBinaryProvider ¶ added in v0.2.0
type DownloadBinaryProvider struct {
// contains filtered or unexported fields
}
DownloadBinaryProvider implements BinaryProvider by downloading from GitHub releases
func NewDownloadBinaryProvider ¶ added in v0.2.0
func NewDownloadBinaryProvider(version string, verbose bool) (*DownloadBinaryProvider, error)
NewDownloadBinaryProvider creates a new provider that downloads binaries
func (*DownloadBinaryProvider) ExtractServerBinary ¶ added in v0.2.0
func (dp *DownloadBinaryProvider) ExtractServerBinary(platform *v1.Platform) ([]byte, fs.FileInfo, error)
ExtractServerBinary downloads and returns the server binary for the specified platform
type FileSystem ¶
type FileSystem interface {
Stat(name string) (fs.FileInfo, error)
ReadFile(name string) ([]byte, error)
}
FileSystem interface for file operations
type ImageBuilder ¶
type ImageBuilder struct {
// contains filtered or unexported fields
}
func New ¶
func New(saveToRegistry bool, version string, verbose bool) (*ImageBuilder, error)
New creates a new ImageBuilder that downloads binaries from GitHub releases
func (*ImageBuilder) Build ¶
func (b *ImageBuilder) Build(ctx context.Context, opts BuildOptions) (v1.Image, error)
func (*ImageBuilder) BuildMultiArch ¶ added in v0.1.1
func (b *ImageBuilder) BuildMultiArch(ctx context.Context, opts MultiArchBuildOptions) (v1.ImageIndex, error)
func (*ImageBuilder) SaveIndex ¶ added in v0.1.1
func (b *ImageBuilder) SaveIndex(ctx context.Context, idx v1.ImageIndex, ref string) error
type ImageDownloader ¶
type ImageDownloader interface {
DownloadImage(ctx context.Context, baseImage string, platform *v1.Platform) (v1.Image, error)
}
ImageDownloader interface for downloading base images
type ImageSaver ¶
type ImageSaver interface {
SaveImage(ctx context.Context, img v1.Image, ref string) error
SaveImageIndex(ctx context.Context, idx v1.ImageIndex, ref string) error
}
ImageSaver interface for saving built images to different destinations
type MultiArchBuildOptions ¶ added in v0.1.1
type MultiArchBuildOptions struct {
Platforms []*v1.Platform // Target platforms
BaseImage string // Base image reference
MCPToolDefinitionsPath string // path to the MCP file
MCPServerConfigPath string // path to the MCP server configuration file
ImageTag string // output image tag
}
func (*MultiArchBuildOptions) SetDefaults ¶ added in v0.1.1
func (o *MultiArchBuildOptions) SetDefaults()
type OSFileSystem ¶
type OSFileSystem struct{}
OSFileSystem implements FileSystem using the standard os package
type RegistryImageSaver ¶
type RegistryImageSaver struct{}
RegistryImageSaver implements ImageSaver for pushing to container registries
func (*RegistryImageSaver) SaveImageIndex ¶ added in v0.1.1
func (r *RegistryImageSaver) SaveImageIndex(ctx context.Context, idx v1.ImageIndex, ref string) error