Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactBuilderInterface ¶
type ArtifactBuilderInterface = storage.ArtifactBuilderInterface
ArtifactBuilderInterface and HotFileObj are storage aliases used by overlay builders and streaming artifact serving.
type ComposerNamesInterface ¶
type ComposerNamesInterface interface {
ComposerPackageNames() []string
ComposerKeyForName(name string) (string, bool)
}
ComposerNamesInterface exposes cross-key composer names and name-to-winner mapping for serve-time p2.
type DataStateInterface ¶
type DataStateInterface interface {
Health() state.HealthViewObj
Snapshot() state.SnapshotObj
KeyState(key string) (state.KeyStateObj, bool)
KeyStates() []state.KeyStateObj
Checksums() state.ChecksumSetObj
}
DataStateInterface exposes health, classification, and version snapshots for data APIs.
type DataStoreInterface ¶
type DataStoreInterface interface {
ListVersionsKeyset(ctx context.Context, key string, includeDeleted bool, afterSeq int64, afterVersion string, limit int) ([]core.VersionObj, error)
ListVersionsKeysetBefore(ctx context.Context, key string, includeDeleted bool, beforeSeq int64, beforeVersion string, limit int) ([]core.VersionObj, error)
ListVersionsPage(ctx context.Context, key string, includeDeleted bool, limit int, offset int) ([]core.VersionObj, error)
CountVersions(ctx context.Context, key string) (uint64, error)
GetVersion(ctx context.Context, key string, version string) (core.VersionObj, bool, error)
LatestVersion(ctx context.Context, key string) (core.VersionObj, bool, error)
GetArtifact(ctx context.Context, keyObj core.ArtifactKeyObj) (core.ArtifactObj, bool, error)
ListArtifacts(ctx context.Context, key string, version string) ([]core.ArtifactObj, error)
EnsureArtifactFile(ctx context.Context, keyObj core.ArtifactKeyObj, builderObj ArtifactBuilderInterface) (*HotFileObj, error)
GetDetection(ctx context.Context, key string, version string) (core.DetectionObj, bool, error)
RewriteSet(ctx context.Context, key string, version string) ([]core.HashObj, error)
ReadTree(ctx context.Context, treeHashObj core.HashObj) ([]core.TreeEntryObj, error)
ReadBlob(ctx context.Context, hashObj core.HashObj) ([]byte, error)
ListPublishFeed(ctx context.Context, key string, limit int) ([]core.FeedEventObj, error)
}
DataStoreInterface is the storage read surface for data APIs: artifacts, detection, versions, and feeds. Signatures match storage.Obj because it is the only production provider.
type DepsObj ¶
type DepsObj struct {
Config *stconf.ConfigObj
Storage DataStoreInterface
State DataStateInterface
Overlay *overlay.Obj
Telemetry *telemetry.Obj
Composer ComposerNamesInterface
Mesh mesh.NodeInterface
Log zerolog.Logger
// Cache is a shared RAM cache for built byte bodies. Nil disables cache and singleflight deduplication.
Cache *cache.Obj
// BuildGate limits detached builds shared by Cache and the typed object cache.
BuildGate *cache.BuildGateObj
}
DepsObj contains edge server dependencies wired by main.go and passed into New.
type HotFileObj ¶
type HotFileObj = storage.HotFileObj
ArtifactBuilderInterface and HotFileObj are storage aliases used by overlay builders and streaming artifact serving.
type Obj ¶ added in v0.4.0
type Obj struct {
// contains filtered or unexported fields
}
Obj holds the edge server. A single ogen router serves per-listener http.Server instances on web and Yggdrasil sockets. Routing and response encoding stay in the router; listeners and lifecycle live here and in listener.go.
func New ¶
New assembles the edge server in three steps: funcObj, sub-services, then the ogen router. The router receives telemetry, middleware, error handling and not-found pages. Listener sockets are bound separately in Start from listener.go.
func (*Obj) Handler ¶ added in v0.4.0
Handler is the outer handler for one entry listener. It injects listener context, applies RPC/ingress/method gates, request ID, and go-proxy host/major stripping. HEAD is routed as GET because ogen only defines GET operations here.