Documentation
¶
Overview ¶
Package grpcserver implements the authenticated local gRPC process boundary without adding transport dependencies to the daemon lifecycle core.
Index ¶
Constants ¶
const ( // AuthenticationMetadataKey is the standard gRPC metadata key carrying the // user-local daemon bearer credential. AuthenticationMetadataKey = "authorization" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointToken ¶
EndpointToken is retained as a source-compatible alias for the shared transport-neutral endpoint credential.
func GenerateEndpointToken ¶
func GenerateEndpointToken() (EndpointToken, error)
GenerateEndpointToken creates a credential from the operating-system CSPRNG.
func ParseEndpointToken ¶
func ParseEndpointToken(encoded string) (EndpointToken, error)
ParseEndpointToken decodes the canonical unpadded base64url credential form.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is one authenticated local gRPC boundary. It wraps gRPC so callers cannot register the engine service without both authentication interceptors.
func NewServer ¶
func NewServer(config ServerConfig) (*Server, error)
NewServer constructs the authenticated boundary without opening an OS listener. Generated applications remain responsible for endpoint ownership.
func (*Server) GracefulStop ¶
func (server *Server) GracefulStop()
GracefulStop stops admission and waits without a deadline. New code should use Shutdown with an explicit deadline so a flow-control-blocked client cannot make process shutdown unbounded.
type ServerConfig ¶
type ServerConfig struct {
Root context.Context //nolint:containedctx // transferred as the server service lifetime.
EndpointToken EndpointToken
Host *daemon.RunHost
Sessions *daemon.SessionStore
Build client.Build
Capabilities []string
MaximumSessions int
}
ServerConfig contains the generated daemon dependencies and immutable public build facts for one local engine server. The server opens no listener and does not own Host or Sessions.