app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package app provides flags for cli.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoName = errors.New("app.Setup: no Name")

ErrNoName is an error in case name is not provided.

Functions

func Context

func Context() context.Context

Context returns main application context with set logger that is canceled when SIGTERM or SIGINT is received.

Types

type Flags

type Flags struct {
	// gRPC listen address
	GRPCAddr string
	// Debug listen address
	DebugAddr string
}

Flags contains flags for cli.

func Setup

func Setup(opts *SetupOpts) (*Flags, error)

Setup initialize app flags for cli.

type SetupOpts

type SetupOpts struct {
	Name string
}

SetupOpts contains options required for app.

Jump to

Keyboard shortcuts

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