grpclb

package module
v0.0.0-...-fd3e562 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: Apache-2.0 Imports: 9 Imported by: 22

README

grpclb

Build Status CircleCI Status Go Report Card GoDoc Release

A gRPC load balancer and service discovery for go

Installation/Update

go get -u github.com/go-vgo/grpclb

Usage:

Look at an example

License

Grpclb is primarily distributed under the terms of the Apache License (Version 2.0).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Prefix should start and end with no slash
	Prefix = "etcd3_naming"
)

Functions

func NewResolver

func NewResolver(serviceName string) *resolver

NewResolver return resolver with service name

func Register

func Register(name, host string, port int, target string,
	interval time.Duration, ttl int, args ...int) error

Register gRPC naming and discovery

func Registry

func Registry(opt Opt, args ...int) error

Registry gRPC naming and discovery

func UnRegister

func UnRegister() error

UnRegister delete registered service from etcd

Types

type Opt

type Opt struct {
	Name     string
	Host     string
	Port     int
	Target   string
	Interval time.Duration
	Ttl      int
}

Opt registry grpc option

Directories

Path Synopsis
pb
Package hello is a generated protocol buffer package.
Package hello is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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