grail

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Overview

Package grail contains the Init function that all programs are expected to call.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shutdown

type Shutdown func()

Shutdown is a function that needs to be called to perform the final cleanup.

func Init

func Init() Shutdown

Init should be called once at the beginning at each executable that doesn't use the github.com/grailbio/base/cmdutil. The Shutdown function should be called to perform the final cleanup (closing logs for example).

Init also applies a default configuration profile (see package github.com/grailbio/base/config), and adds profile flags to the default flag set. The default profile path used is $HOME/grail/profile.

Note that this function will call flag.Parse().

Suggested use:

shutdown := grail.Init()
defer shutdown()

type VlogOutputter added in v0.0.11

type VlogOutputter struct{}

VlogOutputter implements base/log.Outputter backed by vlog.

func (VlogOutputter) Level added in v0.0.11

func (VlogOutputter) Level() log.Level

func (VlogOutputter) Output added in v0.0.11

func (VlogOutputter) Output(calldepth int, level log.Level, s string) error

Directories

Path Synopsis
biofs
biofseventlog
biofseventlog creates usage events for biofs, a GRAIL-internal program.
biofseventlog creates usage events for biofs, a GRAIL-internal program.
go

Jump to

Keyboard shortcuts

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