nihility

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 7 Imported by: 0

README

nihility

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGrpcResolver added in v0.0.2

func InitGrpcResolver(r registry.Registry, timeout time.Duration) (resolver.Builder, error)

Types

type Client added in v0.0.2

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

func InitClient added in v0.0.2

func InitClient(opts ...ClientOption) (*Client, error)

func (*Client) Dial added in v0.0.2

func (c *Client) Dial(ctx context.Context, service string) (*grpc.ClientConn, error)

type ClientOption added in v0.0.2

type ClientOption func(c *Client)

func ClientInsecure added in v0.0.2

func ClientInsecure() ClientOption

func ClientWithRegistry added in v0.0.2

func ClientWithRegistry(r registry.Registry, timeout time.Duration) ClientOption

type Server

type Server struct {
	*grpc.Server
	// contains filtered or unexported fields
}

func InitServer

func InitServer(name string, opts ...ServerOptions) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Start

func (s *Server) Start(addr string) error

Start 服务已经准备好

type ServerOptions

type ServerOptions func(server *Server)

func WithRegister

func WithRegister(r registry.Registry) ServerOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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