v0.0.12 Latest Latest

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 17 Imported by: 0




This section is empty.


This section is empty.


func Environment

func Environment() option.Environment

Environment returns the current environment that the server is running for

func Name

func Name() string

Name returns the name of this server


type HRPC

type HRPC struct {
	// contains filtered or unexported fields

func (HRPC) Run

func (h HRPC) Run() error

Run can be used in cron jobs. It will make connections to the enabled databases without serving a port

func (HRPC) Serve

func (h HRPC) Serve() error

func (HRPC) Server

func (h HRPC) Server() *grpc.Server

type Server

type Server interface {
	// Server returns the gRPC server for registration at PB
	Server() *grpc.Server
	// Serve makes connections to databases and starts to listen ports to serve
	// it will block the current thread
	Serve() error
	// Run same like Serve() but it does not register to consul and starts servers to block
	// It will make connections to databases
	Run() error

Server the server

func NewHRPC

func NewHRPC(opt *option.Options) (Server, error)

Jump to

Keyboard shortcuts

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