mz

package module
v0.0.0-...-7c2846c Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRpcServer

func AddRpcServer(handler AddRpcServerHandler)

Types

type AddRpcServerHandler

type AddRpcServerHandler func(server *RPCServer)

type HttpService

type HttpService struct {
	Service
	// contains filtered or unexported fields
}

func NewHttpService

func NewHttpService(opts ...ServiceOption) (*HttpService, error)

func (*HttpService) Engine

func (m *HttpService) Engine() *gin.Engine

func (*HttpService) Run

func (m *HttpService) Run() error

type IService

type IService interface {
	Name() string
	Address() string
	Run() error
	Rpc(target string) *grpc.ClientConn
	// contains filtered or unexported methods
}

type RPCServer

type RPCServer = grpc.Server

type RpcService

type RpcService struct {
	Service
	// contains filtered or unexported fields
}

func NewRpcService

func NewRpcService(opts ...ServiceOption) (*RpcService, error)

func (*RpcService) AddRpcOptions

func (m *RpcService) AddRpcOptions(opts ...grpc.ServerOption)

func (*RpcService) Run

func (m *RpcService) Run() error

type Service

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

func (*Service) Address

func (m *Service) Address() string

func (*Service) Name

func (m *Service) Name() string

func (*Service) Rpc

func (m *Service) Rpc(target string) *grpc.ClientConn

type ServiceOption

type ServiceOption func(service IService)

func WithAddress

func WithAddress(addr string) ServiceOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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