Documentation
¶
Index ¶
- func StartPodWatcher(ctx context.Context, cfg Config, builder *Builder) error
- type Artifact
- type BuildTask
- type Builder
- type Config
- type HermesPolicyManager
- func (m *HermesPolicyManager) MatchImage(image, defaultPlatform string) []PolicyBuildTarget
- func (m *HermesPolicyManager) RecordBuild(ctx context.Context, policyNames []string, imageDigestRef, platform string, ...)
- func (m *HermesPolicyManager) SetOnChange(fn func())
- func (m *HermesPolicyManager) Start(ctx context.Context) error
- type HermesPolicyStore
- type LayerArtifact
- type PolicyBuildTarget
- type PolicyStatusRecorder
- type RegistryAuth
- type ResolveResponse
- type Server
- type Store
- func (s *Store) Close() error
- func (s *Store) GetBlob(ctx context.Context, dgst string) (mediaType string, size int64, content []byte, err error)
- func (s *Store) HasReady(ctx context.Context, imageDigestRef, platform string) (bool, error)
- func (s *Store) ListRecent(ctx context.Context, limit int) ([]Artifact, error)
- func (s *Store) MarkBuilding(ctx context.Context, task BuildTask, imageDigestRef, manifestDigest string, ...) (bool, error)
- func (s *Store) MarkFailed(ctx context.Context, sourceImageRef, imageDigestRef, platform string, ...) error
- func (s *Store) PutReady(ctx context.Context, artifact Artifact, indexDesc ocispec.Descriptor, ...) error
- func (s *Store) Resolve(ctx context.Context, imageDigestRef, platform string) (*ResolveResponse, error)
- type StringSet
- type ZtocResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct {
ID int64 `json:"id"`
SourceImageRef string `json:"sourceImageRef"`
ImageDigestRef string `json:"imageDigestRef"`
ImageManifestDigest string `json:"imageManifestDigest"`
ImageConfigDigest string `json:"imageConfigDigest"`
Platform string `json:"platform"`
IndexDigest string `json:"indexDigest"`
IndexMediaType string `json:"indexMediaType"`
IndexSize int64 `json:"indexSize"`
Status string `json:"status"`
Error string `json:"error"`
}
type BuildTask ¶
type BuildTask struct {
SourceImageRef string
Platform string
Reason string
PolicyNames []string
RegistryAuths []RegistryAuth
}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(cfg Config, store *Store, recorders ...PolicyStatusRecorder) *Builder
func (*Builder) SetPolicyStatusRecorder ¶
func (b *Builder) SetPolicyStatusRecorder(recorder PolicyStatusRecorder)
type Config ¶
type Config struct {
ListenAddr string
DBPath string
Kubeconfig string
WatchKubernetes bool
WatchNamespace string
Platform string
MaxConcurrency int
QueueSize int
BuildTimeout time.Duration
ContainerdAddress string
ContainerdNS string
HermesRoot string
SpanSize int64
MinLayerSize int64
Optimizations []string
PullImage bool
}
type HermesPolicyManager ¶
type HermesPolicyManager struct {
// contains filtered or unexported fields
}
func NewHermesPolicyManager ¶
func NewHermesPolicyManager(cfg *rest.Config) (*HermesPolicyManager, error)
func (*HermesPolicyManager) MatchImage ¶
func (m *HermesPolicyManager) MatchImage(image, defaultPlatform string) []PolicyBuildTarget
func (*HermesPolicyManager) RecordBuild ¶
func (m *HermesPolicyManager) RecordBuild(ctx context.Context, policyNames []string, imageDigestRef, platform string, phase hermesv1.HermesImagePhase, buildErr error)
func (*HermesPolicyManager) SetOnChange ¶
func (m *HermesPolicyManager) SetOnChange(fn func())
type HermesPolicyStore ¶
type HermesPolicyStore struct {
// contains filtered or unexported fields
}
func NewHermesPolicyStore ¶
func NewHermesPolicyStore() *HermesPolicyStore
func (*HermesPolicyStore) Delete ¶
func (s *HermesPolicyStore) Delete(name string)
func (*HermesPolicyStore) MatchImage ¶
func (s *HermesPolicyStore) MatchImage(image, defaultPlatform string) []PolicyBuildTarget
func (*HermesPolicyStore) Upsert ¶
func (s *HermesPolicyStore) Upsert(policy *hermesv1.HermesPolicy)
type LayerArtifact ¶
type PolicyBuildTarget ¶
type PolicyStatusRecorder ¶
type RegistryAuth ¶
type ResolveResponse ¶
type ResolveResponse struct {
Image string `json:"image"`
Platform string `json:"platform"`
SOCIIndex ocispec.Descriptor `json:"sociIndex"`
Ztocs []ZtocResponse `json:"ztocs"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ListRecent ¶
func (*Store) MarkBuilding ¶
func (*Store) MarkFailed ¶
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
func NewStringSet ¶
func NewStringSet() *StringSet
type ZtocResponse ¶
Click to show internal directories.
Click to hide internal directories.