service

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package service manages the main logic of server.

Package service

Package service represents gateway's service logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway interface {
	Start(ctx context.Context) (<-chan error, error)
	GetAgentCount(ctx context.Context) int
	Addrs(ctx context.Context) []string
	DoMulti(ctx context.Context, num int,
		f func(ctx context.Context, tgt string, ac vald.Client, copts ...grpc.CallOption) error) error
	BroadCast(ctx context.Context,
		f func(ctx context.Context, tgt string, ac vald.Client, copts ...grpc.CallOption) error) error
}

func NewGateway

func NewGateway(opts ...Option) (gw Gateway, err error)

type Option

type Option func(g *gateway) error

func WithDiscoverer

func WithDiscoverer(c discoverer.Client) Option

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

Jump to

Keyboard shortcuts

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