Documentation
¶
Index ¶
Constants ¶
const ( // HTTP uses the same body codec IDs and payload rules as AGP. ContentTypeJSON = "application/json" ContentTypeProtobuf = "application/x-protobuf" // TimeoutHeader lets curl and other HTTP clients request a shorter deadline. TimeoutHeader = "X-ActorGo-Timeout-Ms" // Route is the fixed Gin route for all remotely registered Actor methods. Route = "/actor/:methodID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
Authenticator resolves the server-owned caller session before dispatching to an Actor. Returning nil keeps the request anonymous.
type Component ¶
Component runs the Actor HTTP handler as a standalone net/http server.
func NewComponent ¶
NewComponent creates a standalone Actor HTTP endpoint.
func (*Component) Init ¶
func (c *Component) Init()
Init builds the handler and HTTP server after the application is attached.
func (*Component) OnAfterInit ¶
func (c *Component) OnAfterInit()
OnAfterInit starts listening after Actor routes are available.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler exposes every Methods().Register method through POST /actor/{methodID}.
func NewHandler ¶
func NewHandler(app cfacade.IApplication, opts ...Option) *Handler
NewHandler creates the transport adapter over the application's method table.
type Option ¶
type Option func(*Options)
Option mutates HTTP Actor options during construction.
func WithAuthenticator ¶
func WithAuthenticator(authenticator Authenticator) Option
WithAuthenticator installs one authenticator for all Actor HTTP methods.
func WithMaxBodySize ¶
WithMaxBodySize limits the encoded request body.
func WithMetadataHeaders ¶
WithMetadataHeaders selects HTTP headers copied into RequestContext.Metadata.
func WithTimeout ¶
WithTimeout sets the default request deadline and the client-requested cap.