Documentation
¶
Overview ¶
Package agentpackages validates and indexes APM Agent Packages ZIP archives.
Index ¶
- Constants
- Variables
- func ParsePath(p string) (owner, name, version string, ok bool)
- func Path(owner, name, version string) string
- func Serves(t repo.PackageType) bool
- func ValidComponent(v string) bool
- func ValidVersion(v string) bool
- type Handler
- func (Handler) Admit(_ context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Deleted(context.Context, format.Env, repo.Config, []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) GuardWrite(ctx context.Context, env format.Env, c repo.Config, w format.Write) error
- func (Handler) Inspect(ctx context.Context, env format.Env, _ repo.Config, w format.Write) (any, error)
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- type Metadata
Constants ¶
View Source
const ( MaxArchiveBytes = 64 << 20 MaxManifestBytes = 1 << 20 MaxFiles = 512 )
Variables ¶
View Source
var (
ErrArchive = errors.New("agentpackages: invalid agent package archive")
)
Functions ¶
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidComponent ¶
func ValidVersion ¶
Types ¶
type Handler ¶
func (Handler) GuardWrite ¶
func (Handler) GuardWrite( ctx context.Context, env format.Env, c repo.Config, w format.Write, ) error
GuardWrite keeps version ZIPs immutable through both APM and ordinary item routes. Restore bypasses the guard by design; it reindexes the saved bytes.
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
Version string `json:"version"`
Path string `json:"path"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Types []string `json:"types,omitempty"`
SHA256 string `json:"sha256"`
Size int64 `json:"size"`
}
Metadata carries bounded descriptor fields; the canonical path supplies identity and version after validation.
Click to show internal directories.
Click to hide internal directories.