Documentation
¶
Index ¶
- Constants
- Variables
- func DescriptorPath(dir string) string
- func LifecyclePath(dir string) string
- func LogPath(dir string) string
- func OpenLog(dir string) (io.WriteCloser, error)
- func OwnershipPath(dir string) string
- func PublishDescriptor(dir string, d Descriptor) error
- func RemoveDescriptor(dir, instanceID string) error
- func Run(ctx context.Context, settings Settings, runtimeDir string, ...) error
- func RunForeground(ctx context.Context, settings Settings, input Input, ...) error
- func RuntimeDir() (string, error)
- type Client
- type Collect
- type Collection
- type CollectionFailure
- type Descriptor
- type Input
- type Published
- type Selection
- type Settings
- type StateReset
- type Status
Constants ¶
const ( SelectedCheckout = serverapp.SelectedCheckout DiscoveredCheckouts = serverapp.DiscoveredCheckouts )
Variables ¶
Functions ¶
func DescriptorPath ¶
func LifecyclePath ¶
func OwnershipPath ¶
func PublishDescriptor ¶
func PublishDescriptor(dir string, d Descriptor) error
func RemoveDescriptor ¶
func Run ¶
func Run(ctx context.Context, settings Settings, runtimeDir string, initial *ingestion.Request, reset StateReset, ready func(Status, *contextservice.Publication)) error
func RunForeground ¶
func RunForeground(ctx context.Context, settings Settings, input Input, confirm func(Status) (bool, error), reset StateReset, ready func(Status, Published)) error
RunForeground serializes discovery, replacement and publication. Shutdown uses the authenticated control endpoint, never an unverified operating-system PID.
func RuntimeDir ¶
Types ¶
type Collect ¶
Collection, CollectionFailure and Published describe local collections of the selected checkouts for command entry points.
type Collection ¶
type Collection = serverapp.Collection
Collection, CollectionFailure and Published describe local collections of the selected checkouts for command entry points.
type CollectionFailure ¶
type CollectionFailure = serverapp.CollectionFailure
Collection, CollectionFailure and Published describe local collections of the selected checkouts for command entry points.
type Descriptor ¶
type Descriptor struct {
Endpoint string `json:"endpoint"`
Token string `json:"token"`
Status Status `json:"status"`
}
func ReadDescriptor ¶
func ReadDescriptor(dir string) (Descriptor, error)
type Input ¶
type Input struct {
Collection Collection
Collect Collect
Selection Selection
}
Input supplies a fixed capture or checkout collection to run in the background at startup and again on explicit user request. Selection names the scope Collect gathers.
type Published ¶
Collection, CollectionFailure and Published describe local collections of the selected checkouts for command entry points.
type Selection ¶ added in v0.2.2
Collection, CollectionFailure and Published describe local collections of the selected checkouts for command entry points.
type Settings ¶
type Settings = controlapi.Settings
type StateReset ¶
type StateReset struct {
// Force backs up current or older state before opening.
Force bool
// Confirm is asked when older diffx state would otherwise be refused.
Confirm func(*reviewstore.StateError) (bool, error)
// Saved reports the backup of replaced state.
Saved func(backup string)
}
StateReset is an entry point's decision to replace local state. Remote composition has none, so its incompatible state is always refused.
type Status ¶
type Status = controlapi.Status