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 ¶
New creates a new Builder instance with the given configuration. It returns a pointer to the Builder instance.
func (*Builder) AgentApp ¶
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) AgentRegisterApp ¶ added in v1.1.0
AgentRegisterApp is a method of the Builder struct.
It registers the agent application with the server. It returns an error if the registration fails.
ctx: The context.Context to use for the gRPC call.
Returns: An error if the registration fails.
func (*Builder) Logger ¶
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.