service

package
v0.0.0-...-3bb466a Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package service handles setting up a gRPC service with all the bells and whistles required to operate it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	appname string,
	setFlag func(fs flag.FlagSet),
	addr AddrsFunc,
	registerFn func(log.Log, metric.Node, discover.Dialer, *grpc.Server),
)

Start prepares and runs a service until it fails, somehow.

Types

type AddrsFunc

type AddrsFunc func() (string, string, string)

AddrsFunc is required by a service so that it know what addresses to listen on and where to discover services. It is evaluated only once the flags have been parsed.

func Addrs

func Addrs(rpcAddr, statusAddr, discoveryAddr *string) AddrsFunc

Addrs returns the addresses a service will use to provide rpc (gRPC) and status (HTTP), and the address where to reach the discovery service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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