service

package module
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: BSD-2-Clause Imports: 12 Imported by: 32

README

Service

Example for create a service can be found in example/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterErrors

func FilterErrors(fn run.Func, filteredErrors ...error) run.Func

FilterErrors for the given func

func Main

func Main(
	ctx context.Context,
	app Application,
	sentryDSN *string,
	sentryProxy *string,
	fns ...OptionsFn,
) int

func MainCmd

func MainCmd(
	ctx context.Context,
	app run.Runnable,
) int

MainCmd has no sentry and don't print anything

func Run

func Run(ctx context.Context, funcs ...run.Func) error

Types

type Application

type Application interface {
	Run(ctx context.Context, sentryClient libsentry.Client) error
}

type Options

type Options struct {
	ExcludeErrors sentry.ExcludeErrors
}

func NewOptions

func NewOptions(fns ...OptionsFn) Options

type OptionsFn

type OptionsFn func(option *Options)

type Service

type Service interface {
	Run(ctx context.Context) error
}

func NewService

func NewService(
	sentryClient libsentry.Client,
	app Application,
) Service

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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