Documentation
¶
Overview ¶
Package grpc provides reviewed, instance-owned gRPC server and client integration for Spice applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifest ¶
func Manifest() spicestarter.Manifest
Manifest returns gRPC starter compatibility and review metadata.
func OpenClient ¶
func OpenClient( config ClientConfig, observers ...Observer, ) (*nativegrpc.ClientConn, lifecycle.Cleanup, error)
OpenClient constructs an instance-owned client connection without performing network I/O. Generated protobuf clients accept the returned connection.
Types ¶
type ClientConfig ¶
ClientConfig defines one explicit gRPC client connection. Construction does not perform network I/O.
type Direction ¶
type Direction string
Direction identifies which side of an RPC emitted an observation.
type Interaction ¶
Interaction contains payload-free RPC facts.
type Observer ¶
Observer receives RPC begin/end information. Implementations must not add request or response payloads to logs, metrics, or traces.
type Registration ¶
type Registration struct {
Service string
Register func(nativegrpc.ServiceRegistrar) error
}
Registration binds one generated protobuf service to a server. Register normally calls the generated Register<Service>Server function.
type Result ¶
type Result struct {
Interaction Interaction
Code codes.Code
Duration time.Duration
}
Result describes one completed RPC without exposing request or response values.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns one native gRPC server and optional standard health service.
func OpenServer ¶
func OpenServer( config ServerConfig, registrations []Registration, observers ...Observer, ) (*Server, lifecycle.Cleanup, error)
OpenServer constructs and registers an instance-owned server without binding a listener or starting background work.
func (*Server) Close ¶
Close gracefully drains active RPCs. If the caller's context expires, Close force-stops the server and returns the cancellation cause.
func (*Server) Serve ¶
Serve runs the complete registered server on a caller-owned listener. It may be called exactly once.
func (*Server) SetServing ¶
SetServing updates the optional standard gRPC health service.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
starter-grpc-release
command
Command starter-grpc-release builds deterministic signed library artifacts.
|
Command starter-grpc-release builds deterministic signed library artifacts. |
|
internal
|
|
|
qualitygate
command
Command qualitygate runs starter-grpc's repository-owned cross-platform checks.
|
Command qualitygate runs starter-grpc's repository-owned cross-platform checks. |
|
release
Package release builds deterministic, signed source releases from exact Git commits.
|
Package release builds deterministic, signed source releases from exact Git commits. |