Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StreamCanceledErr = errors.New("stream canceled")
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
func WithMetadata ¶
func WithMetadata(m rpc.Metadata) CallOption
func WithOutputMetadata ¶
func WithOutputMetadata(m *rpc.Metadata) CallOption
func WithParams ¶
func WithParams(params ...any) CallOption
func WithStream ¶
func WithStream() CallOption
type Client ¶
type ClientOption ¶
type ClientOption func(*client)
func WithTLSConfig ¶
func WithTLSConfig(cfg *tls.Config) ClientOption
type IDGenerator ¶
type InOutStreamer ¶
type InOutStreamer[I, O any] interface { InStreamer[I] OutStreamer[O] }
func MakeInOutStream ¶
func MakeInOutStream[I, O any](c Context) InOutStreamer[I, O]
type InStreamer ¶
func MakeInStream ¶
func MakeInStream[I any](c Context) InStreamer[I]
type Interceptor ¶
type Interceptor func(ctx context.Context, req Context, next Interceptor) error
type OutStreamer ¶
func MakeOutStream ¶
func MakeOutStream[O any](c Context) OutStreamer[O]
type Server ¶
type Server interface {
RegisterService(service Service) error
MustRegisterService(service Service)
Serve() error
Shutdown() error
RegisterInterceptor(interceptor ...Interceptor)
}
func NewServerListen ¶
func NewServerListen(addr string, opts ServerOptions) (Server, error)
type ServerOptions ¶
type ServerOptions struct {
MaxConcurrentStreams uint32 /* TODO */
Logger stdlog.Logger
IDGenerator IDGenerator
}
type Service ¶
type Service interface {
ServiceResponder
ArfServiceID() string
RespondsTo(name string) bool
}
type ServiceAdapter ¶
type ServiceAdapter struct {
Methods map[string]ServiceExecutor
ServiceID string
}
func (ServiceAdapter) ArfServiceID ¶
func (s ServiceAdapter) ArfServiceID() string
func (ServiceAdapter) InvokeMethod ¶
func (ServiceAdapter) RespondsTo ¶
func (s ServiceAdapter) RespondsTo(name string) bool
Click to show internal directories.
Click to hide internal directories.