grpc

package
v0.0.0-...-5ba8ac2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 9

Documentation

Index

Constants

View Source
const (
	AppName = config.GrpcName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	Host    string `json:"host" yaml:"host"`
	Port    int    `json:"port" yaml:"port"`
	Token   string `json:"token" yaml:"token"`
	Otlp    bool   `json:"otlp" yaml:"otlp"`
	ioc.ObjectImpl
	// contains filtered or unexported fields
}

func Get

func Get() *Server

func (*Server) Addr

func (s *Server) Addr() string

func (*Server) Close

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

func (*Server) Init

func (s *Server) Init()

func (*Server) Name

func (s *Server) Name() string

func (*Server) Options

func (s *Server) Options() (opts []grpc.ServerOption)

func (*Server) PrettyAddr

func (s *Server) PrettyAddr() string

func (*Server) Priority

func (s *Server) Priority() int

func (*Server) Server

func (s *Server) Server() *grpc.Server

func (*Server) Start

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

func (*Server) TokenAuth

func (s *Server) TokenAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

Jump to

Keyboard shortcuts

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