Documentation
¶
Index ¶
Constants ¶
const ( ApplicationWebSocketPath = "/api/aop/application/ws" NodeWebSocketPath = "/api/aop/node/ws" )
Variables ¶
var ErrConnectionClosed = errors.New("AOP connection closed")
Functions ¶
func RegisterConnectServices ¶ added in v0.4.0
RegisterConnectServices mounts management RPCs and the AOP bidirectional stream using only the unified Service abstraction. The handler negotiates Connect, gRPC and gRPC-Web on the same paths.
Types ¶
type Auth ¶ added in v0.4.0
type Auth interface {
Enabled() bool
Authenticate(*http.Request) bool
Middleware(http.Handler) http.Handler
RegisterRoutes(*http.ServeMux)
}
Auth is the authentication mechanism required by Web transports. The concrete policy and credential state are owned by the service package.
type Connection ¶ added in v0.4.0
type Connection struct {
// contains filtered or unexported fields
}
Connection is the root Web mechanism for one duplex EnvelopeStream. It owns exactly one reader and one FIFO writer; protocol and business state remain behind the Service abstraction.
func NewConnection ¶ added in v0.4.0
func NewConnection(parent context.Context, stream aop.EnvelopeStream) (*Connection, error)
func (*Connection) Close ¶ added in v0.4.0
func (c *Connection) Close()
func (*Connection) Context ¶ added in v0.4.0
func (c *Connection) Context() context.Context
func (*Connection) Run ¶ added in v0.4.0
func (c *Connection) Run(first *aop.Envelope, handler func(context.Context, *aop.Envelope, aop.SendFunc) error) (runErr error)
Run receives and dispatches envelopes until the stream, writer, handler, or context terminates. A non-nil first envelope is dispatched before Recv.
type Service ¶
type Service interface {
API() *managementapi.API
Auth() Auth
ServeApplication(context.Context, aop.EnvelopeStream) error
ApplicationWebSocketHandler() http.Handler
NodeWebSocketHandler() http.Handler
}
Service is the single transport-facing abstraction for AIScan Web. The root package owns only this contract and transport mechanisms; business runtime, persistence, agents and authentication live in pkg/web/service.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api implements AIScan's protocol-neutral Web management API.
|
Package api implements AIScan's protocol-neutral Web management API. |
|
Package service defines the transport-facing Web service contract and the service-owned authentication component.
|
Package service defines the transport-facing Web service contract and the service-owned authentication component. |