build

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder is a structure that provides methods to build the agent and the client.

func New

func New(config *config.Config) *Builder

New creates a new Builder instance with the given configuration. It returns a pointer to the Builder instance.

func (*Builder) AgentApp

func (b *Builder) AgentApp(ctx context.Context) error

AgentApp creates a gRPC client and connects to the server's update service. It returns an error if the connection or the update service call fails.

ctx: The context.Context to use for the gRPC call. Returns: An error if the connection or update service call fails.

func (*Builder) Logger

func (b *Builder) Logger(ctx context.Context) context.Context

Logger creates a new context with a logger attached to it.

It creates a logger with the log level specified in the environment variable LOG_LEVEL. The logger is then attached to the given context.

Parameters:

  • ctx: The context to attach the logger to.

Returns:

  • The context with the logger attached.

Jump to

Keyboard shortcuts

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