rpc

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannelServiceServer

func NewChannelServiceServer(app *app.App) pb.ChannelServiceServer

NewChannelServiceServer initializes a new channel service.

func NewContactServiceServer

func NewContactServiceServer(app *app.App) pb.ContactServiceServer

NewContactServiceServer initializes a new contact service.

func NewDiscussionServiceServer

func NewDiscussionServiceServer(app *app.App) pb.DiscussionServiceServer

NewDiscussionServiceServer initializes a new discussion service.

func NewMessageServiceServer

func NewMessageServiceServer(app *app.App) pb.MessageServiceServer

NewMessageServiceServer initializes a new message service.

func NewNodeInfoServiceServer

func NewNodeInfoServiceServer(app *app.App) pb.NodeInfoServiceServer

NewNodeInfoServiceServer initializes a new node info service.

func NewPaymentServiceServer

func NewPaymentServiceServer(app *app.App) pb.PaymentServiceServer

NewPaymentServiceServer initializes a new payment service.

func WithBasicAuth

func WithBasicAuth(username, hashedPassword string) func(*Server) error

WithBasicAuth creates an authorization interceptor with the provided basic auth credentials.

func WithTLS

func WithTLS(tlsCertPath string, tlsKeyPath string) func(*Server) error

WithTLS enables TLS for the Server instance.

Types

type Server

type Server struct {
	Log *slog.Logger

	App *app.App

	Listener net.Listener

	// Embedded field
	*grpc.Server
	// contains filtered or unexported fields
}

Server is the RPC server struct.

func New

func New(address string, app *app.App, options ...func(*Server) error) (*Server, error)

New creates a new instance of Server with all services registered.

func (*Server) Cleanup

func (s *Server) Cleanup() error

Cleanup cleans up and terminates the rpc server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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