micro

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

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

func (*Client) Dial

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

type ClientOption

type ClientOption func(c *Client)

func ClientWithBalancer

func ClientWithBalancer(balancer string) ClientOption

func ClientWithInsecure

func ClientWithInsecure(insecure bool) ClientOption

func ClientWithRegistry

func ClientWithRegistry(r registry.Registry) ClientOption

type GrpcResolverBuilder

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

func (*GrpcResolverBuilder) Build

func (*GrpcResolverBuilder) Scheme

func (b *GrpcResolverBuilder) Scheme() string

type GrpcResolverBuilderOption

type GrpcResolverBuilderOption func(b *GrpcResolverBuilder)

func GrpcResolverBuilderWithTimeOut

func GrpcResolverBuilderWithTimeOut(timeOut time.Duration) GrpcResolverBuilderOption

type Server

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

func NewServer

func NewServer(name string, opts ...ServerOpt) *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) Start

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

type ServerOpt

type ServerOpt func(s *Server)

func ServerWithGroupName

func ServerWithGroupName(group string) ServerOpt

func ServerWithRegistry

func ServerWithRegistry(r registry.Registry) ServerOpt

func ServerWithWeight

func ServerWithWeight(weight uint32) ServerOpt

Jump to

Keyboard shortcuts

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