service

package
v1.76.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicService

type BasicService struct {
	// contains filtered or unexported fields
}

BasicService provides common registry operations with standardized logging

func NewBasicService

func NewBasicService(name string, client registry.Client, logger *log.Logger) *BasicService

NewBasicService creates a new basic service

func (*BasicService) CheckImageExists

func (s *BasicService) CheckImageExists(ctx context.Context, tag string) error

func (*BasicService) GetDigest

func (s *BasicService) GetDigest(ctx context.Context, tag string) (*v1.Hash, error)

GetDigest retrieves a digest from the registry

func (*BasicService) GetImage

func (s *BasicService) GetImage(ctx context.Context, tag string, opts ...registry.ImageGetOption) (registry.Image, error)

GetImage retrieves an image from the registry

func (*BasicService) GetImageConfig added in v1.76.0

func (s *BasicService) GetImageConfig(ctx context.Context, tag string) (*v1.ConfigFile, error)

func (*BasicService) ListTags

func (s *BasicService) ListTags(ctx context.Context, opts ...registry.ListTagsOption) ([]string, error)

type CanarySettings

type CanarySettings struct {
	Enabled  bool
	Waves    uint
	Interval time.Duration
}

type DeckhouseReleaseMetadata

type DeckhouseReleaseMetadata struct {
	Version string

	Canary       map[string]CanarySettings
	Requirements map[string]string
	Disruptions  map[string][]string
	Suspend      bool

	Changelog map[string]interface{}
}

type DeckhouseReleaseService

type DeckhouseReleaseService struct {
	*BasicService
}

func NewDeckhouseReleaseService

func NewDeckhouseReleaseService(basicService *BasicService) *DeckhouseReleaseService

func (*DeckhouseReleaseService) GetMetadata

type DeckhouseService

type DeckhouseService struct {
	*BasicService
	// contains filtered or unexported fields
}

DeckhouseService provides high-level operations for Deckhouse platform management

func NewDeckhouseService

func NewDeckhouseService(client registry.Client, logger *log.Logger) *DeckhouseService

NewDeckhouseService creates a new deckhouse service

func (*DeckhouseService) GetRoot

func (s *DeckhouseService) GetRoot() string

GetRoot gets path of the registry root

func (*DeckhouseService) ReleaseChannels

func (s *DeckhouseService) ReleaseChannels() *DeckhouseReleaseService

type PackageDefinition added in v1.76.0

type PackageDefinition struct {
	Type string `yaml:"type"`
}

PackageDefinition represents the minimal parsed content of package.yaml. It's needed for fallback type detection if the package type label is not set in both version and release images for some reason.

type PackageReleaseService added in v1.76.0

type PackageReleaseService struct {
	*BasicService
}

PackageReleaseService provides access to the <package>/release path for legacy v1alpha1 modules.

func NewPackageReleaseService added in v1.76.0

func NewPackageReleaseService(basicService *BasicService) *PackageReleaseService

type PackageService

type PackageService struct {
	*BasicService
	// contains filtered or unexported fields
}

PackageService provides high-level operations for Deckhouse platform management

func NewPackageService

func NewPackageService(client registry.Client, logger *log.Logger) *PackageService

NewPackageService creates a new deckhouse service

func (*PackageService) GetRoot

func (s *PackageService) GetRoot() string

GetRoot gets path of the registry root

func (*PackageService) Release added in v1.76.0

func (s *PackageService) Release() *PackageReleaseService

Release returns the service for accessing <package>/release path (legacy v1alpha1 modules).

func (*PackageService) Versions added in v1.76.0

func (s *PackageService) Versions() *PackageVersionService

Versions returns the service for accessing <package>/version path (new v1alpha2 modules).

type PackageVersionMetadata

type PackageVersionMetadata struct {
	Version string

	Changelog map[string]interface{}
}

type PackageVersionService

type PackageVersionService struct {
	*BasicService
}

func NewPackageVersionService

func NewPackageVersionService(basicService *BasicService) *PackageVersionService

func (*PackageVersionService) GetMetadata

func (*PackageVersionService) HasModuleDefinition added in v1.76.0

func (s *PackageVersionService) HasModuleDefinition(ctx context.Context, tag string) (bool, error)

HasModuleDefinition checks whether the version image contains a module.yaml (or module.yml) file. This is used as a fallback to identify legacy modules when neither type labels nor package.yaml are present.

Returns (false, nil) if the image does not exist.

func (*PackageVersionService) ReadPackageDefinition added in v1.76.0

func (s *PackageVersionService) ReadPackageDefinition(ctx context.Context, tag string) (*PackageDefinition, error)

ReadPackageDefinition reads package.yaml from the version image and parses its type field. It's needed if for some reason we haven't set the package type label in both version and release images.

Returns nil if package.yaml is not found or the image does not exist.

type PackagesService

type PackagesService struct {
	*BasicService
	// contains filtered or unexported fields
}

func NewPackagesService

func NewPackagesService(client registry.Client, logger *log.Logger) *PackagesService

func (*PackagesService) Package

func (s *PackagesService) Package(packageName string) *PackageService

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides high-level registry operations using a registry client

func NewService

func NewService(client registry.Client, logger *log.Logger) *Service

NewService creates a new registry service with the given client and logger

func (*Service) DeckhouseService

func (s *Service) DeckhouseService() *DeckhouseService

DeckhouseService returns the deckhouse service

func (*Service) GetRoot

func (s *Service) GetRoot() string

GetRoot gets path of the registry root

func (*Service) PackagesService

func (s *Service) PackagesService(registryURL string, dockerCFG string, ca string, userAgent string, scheme string) (*PackagesService, error)

PackagesService returns the packages service

type ServiceManager

type ServiceManager[T any] struct {
	// contains filtered or unexported fields
}

func NewPackageServiceManager

func NewPackageServiceManager(logger *log.Logger) *ServiceManager[PackagesService]

func (*ServiceManager[T]) Service

func (m *ServiceManager[T]) Service(registryURL string, config utils.RegistryConfig) (*T, error)

type ServiceManagerInterface

type ServiceManagerInterface[T any] interface {
	Service(registryURL string, config utils.RegistryConfig) (*T, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL