grpc

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package grpc provides the hiboot starter for injectable grpc client and server dependency

Index

Constants

This section is empty.

Variables

View Source
var Client = RegisterClient

Client register client from application, it is a alias to RegisterClient

View Source
var Server = RegisterServer

Server alias to RegisterServer

Functions

func RegisterClient added in v0.4.0

func RegisterClient(name string, clientConstructors ...interface{})

RegisterClient register client from application

func RegisterServer added in v0.4.0

func RegisterServer(register interface{}, server interface{})

RegisterServer register server from application

Types

type ClientConnector added in v0.6.2

type ClientConnector interface {
	// Connect connect the gRPC client
	Connect(name string, cb interface{}, prop *ClientProperties) (gRPCCli interface{}, err error)
}

ClientConnector interface is response for creating grpc client connection

type ClientFactory added in v0.9.0

type ClientFactory interface {
}

ClientFactory build grpc clients

type ClientProperties added in v0.6.2

type ClientProperties struct {
	Host      string    `json:"host"`
	Port      string    `json:"port" default:"7575"`
	PlainText bool      `json:"plain_text" default:"true"`
	KeepAlive keepAlive `json:"keep_alive"`
}

ClientProperties used for grpc client injection

type ServerFactory added in v0.9.0

type ServerFactory interface {
}

ServerFactory build grpc servers

Directories

Path Synopsis
Package mock_helloworld is a generated GoMock package.
Package mock_helloworld is a generated GoMock package.

Jump to

Keyboard shortcuts

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