safe

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, showEncryptedSecrets bool)

func Post

func Post(parentContext context.Context,
	sc entity.SentinelCommand,
)

func PostInitializationComplete added in v0.22.4

func PostInitializationComplete(parentContext context.Context)

PostInitializationComplete is a function that signals the completion of a post-initialization process. It takes a parent context as an argument and performs several steps involving timeout management, source acquisition, error handling, and sending a notification about the initialization completion.

In a separate goroutine, it tries to acquire a source and sends the source and a proceed signal back to the main function through channels. The main function then waits for either a timeout or a source to be returned.

If a timeout occurs, it logs an error depending on whether it’s due to deadline exceeded or an unknown reason. If a source is received, it checks whether to proceed. If not, it returns early.

If proceeding, the function then creates an authorizer and builds a client with mutual TLS configuration. It creates a new request payload, marshals it to JSON, and sends a POST request to a specified endpoint.

Parameters:

  • parentContext (context.Context): The parent context from which the function will derive its context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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