ctl

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotificationHandler

func NotificationHandler(ctx context.Context, handlers map[ipc.Message]func() error) error

NotificationHandler executes the handler when a notification is received. In Unix notifications are defined as SIGUSR1 signals.

Types

type NotificationHandlerWithCancellation

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

NotificationHandlerWithCancellation wraps NotificationHandler with a cancellation context.

func NewNotificationHandlerWithCancellation

func NewNotificationHandlerWithCancellation(ctx context.Context) *NotificationHandlerWithCancellation

NewNotificationHandlerWithCancellation creates a new instance of NotificationHandlerWithCancellation.

func (*NotificationHandlerWithCancellation) RegisterHandler

func (n *NotificationHandlerWithCancellation) RegisterHandler(message ipc.Message, handler func() error)

RegisterHandler register a message handler

func (*NotificationHandlerWithCancellation) Start

Start starts the handler in a separate go routine.

func (*NotificationHandlerWithCancellation) Stop

Stop the handler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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