grpc

package
v1.39.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationIdHeader = "x-application-identity"
	UserIdHeader        = "x-user-identity"
	DeviceIdHeader      = "x-device-identity"
	ServiceIdHeader     = "x-service-identity"
	DomainIdHeader      = "x-domain-identity"
	SystemIdHeader      = "x-system-identity"
	UserTokenHeader     = "x-user-token"
	DeviceTokenHeader   = "x-device-token"
)
View Source
const (
	DefaultMaxSizeByte = 64 * 1024 * 1024
)
View Source
const (
	ProxyMethodNameHeader = "proxy_method_name"
)

Variables

This section is empty.

Functions

func StringFromMd

func StringFromMd(key string, md metadata.MD) (string, error)

Types

type AuthData

type AuthData metadata.MD

func (AuthData) ApplicationId

func (i AuthData) ApplicationId() (int, error)

func (AuthData) DeviceId

func (i AuthData) DeviceId() (int, error)

func (AuthData) DeviceToken

func (i AuthData) DeviceToken() (string, error)

func (AuthData) DomainId

func (i AuthData) DomainId() (int, error)

func (AuthData) ServiceId

func (i AuthData) ServiceId() (int, error)

func (AuthData) SystemId

func (i AuthData) SystemId() (int, error)

func (AuthData) UserId

func (i AuthData) UserId() (int, error)

func (AuthData) UserToken

func (i AuthData) UserToken() (string, error)

type HandlerFunc

type HandlerFunc func(ctx context.Context, message *isp.Message) (*isp.Message, error)

type Middleware

type Middleware func(next HandlerFunc) HandlerFunc

type Mux

type Mux struct {
	isp.UnimplementedBackendServiceServer
	// contains filtered or unexported fields
}

func NewMux

func NewMux() *Mux

func (*Mux) Handle

func (m *Mux) Handle(endpoint string, handler HandlerFunc) *Mux

func (*Mux) Request

func (m *Mux) Request(ctx context.Context, message *isp.Message) (*isp.Message, error)

func (*Mux) RequestStream

func (m *Mux) RequestStream(_ isp.BackendService_RequestStreamServer) error

type Server

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

func DefaultServer

func DefaultServer(restOptions ...grpc.ServerOption) *Server

func NewServer

func NewServer(opts ...grpc.ServerOption) *Server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(address string) error

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Upgrade

func (s *Server) Upgrade(service isp.BackendServiceServer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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