Documentation
¶
Overview ¶
Package wire holds the value types shared between the public engine package and internal subsystems (plugin, runner). Engine re-exports each type as an alias so the public API surface is unchanged.
The package exists solely to break the would-be import cycle:
engine ⇄ internal/{plugin,runner}
Subsystems import wire; engine imports both wire and the subsystems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventSpec ¶
type EventSpec struct {
Description string `json:"description"`
Fields map[string]FieldSpec `json:"fields"`
}
EventSpec describes a single event a plugin can emit at runtime.
type FieldSpec ¶
type FieldSpec struct {
Type FieldType `json:"type"`
Required bool `json:"required"`
Description string `json:"description"`
}
FieldSpec describes one field in a plugin contract.
type FieldType ¶
type FieldType string
FieldType enumerates the YAML/JSON types a plugin field may hold.
type PluginEvent ¶
type PluginEvent struct {
Plugin string `json:"plugin"`
Kind string `json:"kind"`
Data map[string]any `json:"data,omitempty"`
}
PluginEvent is the universal wrapper for events emitted by plugins.
func (PluginEvent) FullName ¶
func (e PluginEvent) FullName() string
FullName returns the fully-qualified event name "<plugin>.<kind>".
type PluginSchema ¶
type PluginSchema struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Protocols []Protocol `json:"protocols"`
Capabilities []string `json:"capabilities,omitempty"`
Fields map[string]FieldSpec `json:"fields,omitempty"`
Events map[string]EventSpec `json:"events,omitempty"`
}
PluginSchema is the public introspection shape for a loaded plugin.
type Protocol ¶
type Protocol string
Protocol identifies a target protocol, derived from the target URL scheme or declared explicitly by a plugin.
const ( ProtocolHTTP Protocol = "http" ProtocolHTTPS Protocol = "https" ProtocolGRPC Protocol = "grpc" ProtocolGRPCS Protocol = "grpcs" ProtocolWS Protocol = "ws" ProtocolWSS Protocol = "wss" ProtocolGraphQL Protocol = "graphql" ProtocolSQL Protocol = "sql" ProtocolKafka Protocol = "kafka" ProtocolAMQP Protocol = "amqp" ProtocolRedis Protocol = "redis" )
type TestStatus ¶
type TestStatus int
TestStatus represents the outcome of a test case.
const ( StatusPassed TestStatus = iota StatusFailed StatusSkipped StatusErrored )
func (TestStatus) String ¶
func (s TestStatus) String() string
String returns the canonical name for a status.