grpcserver

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package grpcserver serves the engine's gRPC services to other engines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Address is the TCP address to listen on.
	Address string

	// EventStreamConsumerAPI is the implementation of the
	// [messaginggrpc.EventStreamConsumerAPI] service to serve.
	EventStreamConsumerAPI messaginggrpc.EventStreamConsumerAPIServer

	// Options are the options used to create the underlying gRPC server.
	Options []grpc.ServerOption

	// Logger is the target for log messages produced by the server.
	Logger *slog.Logger

	// Listen opens a listener. If it is nil, [net.Listen] is used.
	Listen func(network, address string) (net.Listener, error)
	// contains filtered or unexported fields
}

Server serves gRPC requests from other engines.

func (*Server) ListenAddr

func (s *Server) ListenAddr(ctx context.Context) (net.Addr, error)

ListenAddr returns the address that the server is listening on, blocking until it has started listening or ctx is canceled.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run serves gRPC requests until ctx is canceled.

It must be called at most once.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL