signal

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interceptor added in v0.29.0

type Interceptor struct {
	// contains filtered or unexported fields
}

Interceptor - сервис перехвата системных событий с целью корректной (graceful) остановки всего приложения.

func NewInterceptor added in v0.29.0

func NewInterceptor(ctx context.Context, logger mrlog.Logger) (context.Context, *Interceptor)

NewInterceptor - создаёт объект Interceptor и возвращает контекст, в котором установлена его отмена при перехвате системного события.

func (*Interceptor) Caption added in v0.29.0

func (p *Interceptor) Caption() string

Caption - возвращает название сервиса.

func (*Interceptor) ReadyTimeout added in v0.29.0

func (p *Interceptor) ReadyTimeout() time.Duration

ReadyTimeout - возвращает максимальное время, за которое должен быть запущен сервис.

func (*Interceptor) Shutdown added in v0.29.0

func (p *Interceptor) Shutdown(ctx context.Context) error

Shutdown - корректная остановка сервиса перехвата системных событий.

func (*Interceptor) Start added in v0.29.0

func (p *Interceptor) Start(ctx context.Context, ready func()) error

Start - запуск сервиса перехвата системных событий. Повторный запуск метода одно и того же объекта не предусмотрен, даже после вызова Shutdown.

Jump to

Keyboard shortcuts

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