rpc

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORSConfig added in v0.25.3

type CORSConfig struct {
	Enabled        bool
	AllowedOrigins []string
	AllowedMethods []string
	AllowedHeaders []string
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	address, port string,
	authDisabled bool,
	corsConfig CORSConfig,
	signer jwt.Signer,
	verifier jwt.Verifier,
) *Server

func (*Server) ListenAddr

func (s *Server) ListenAddr() string

ListenAddr returns the listen address of the server.

func (*Server) RegisterService

func (s *Server) RegisterService(namespace string, service, out any)

RegisterService registers a service onto the RPC server. All methods on the service will then be exposed over the RPC.

func (*Server) Start

func (s *Server) Start(context.Context) error

Start starts the RPC Server.

func (*Server) Stop

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

Stop stops the RPC Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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