defaults

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package defaults initializes the defaults GRPC clients and servers used by services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broker

func Broker() broker.Broker

func Init

func Init(opt ...Option)

Init function containing all defaults

func NewClient

func NewClient(new ...client.Option) client.Client

NewClient returns a client attached to the defaults

func NewServer

func NewServer(new ...server.Option) server.Server

NewServer returns a server attached to the defaults

func Registry

func Registry() registry.Registry

func Transport

func Transport() transport.Transport

Types

type Option

type Option func(*Options)

func WithBroker

func WithBroker(b broker.Broker) Option

func WithCert

func WithCert(c string, k string) Option

func WithRegistry

func WithRegistry(r registry.Registry) Option

func WithTransport

func WithTransport(t transport.Transport) Option

type Options

type Options struct {
	Selector  selector.Selector
	Registry  registry.Registry
	Broker    broker.Broker
	Transport transport.Transport
	CertFile  string
	KeyFile   string
	Client    func(new ...client.Option) client.Client
	Server    func(new ...server.Option) server.Server
}

Jump to

Keyboard shortcuts

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