svc_disc

package
v0.0.0-...-2022bb5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timeout = 5 * time.Second

Functions

func ClientConn

func ClientConn(ctx context.Context, service string, opts ...grpc.DialOption) *grpc.ClientConn

ClientConn 获取一个 grpc 客户端

func Init

func Init(ctx context.Context)

Init 初始化服务发现 会初始化 etcd 服务发现 如果是 dev 环境,会读取 etcd-dev.yaml 配置到缓存,方便本地开发访问 grpc 服务

func LibManagerClientConn

func LibManagerClientConn(ctx context.Context) *grpc.ClientConn

LibManagerClientConn 获取图书馆管理服务的连接

func Register

func Register(address string, option ...etcd.Option)

Register 注册服务发现,使用 etcd

func SeatClientConn

func SeatClientConn(ctx context.Context) *grpc.ClientConn

SeatClientConn 获取座位服务的连接

func UserClientConn

func UserClientConn(ctx context.Context) *grpc.ClientConn

UserClientConn 获取用户服务的客户端连接

Types

This section is empty.

Jump to

Keyboard shortcuts

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