adminapi

package
v0.0.0-...-ccadce5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallAPI

func CallAPI(method, url, postData string, headers map[string]string) (*http.Response, error)

CallAPI creates a http.Request object, attaches headers to it and makes the requested api call.

func GetConfig

func GetConfig(apiConfig agent.APIConfig) (agent.Config, error)

GetConfig fetches config from admin api

func Log

func Log(apiConfig agent.APIConfig, logEntry agent.TaskLogEntry) error

Process logs to the logentries online log service

func SayHello

func SayHello(apiConfig agent.APIConfig, agentStartTime time.Time) error

SayHello makes a POST call to /hello with id, version, and update

Types

type Hello

type Hello struct {
	ID      string `json:"id"`
	Version string `json:"version"`
	Uptime  int64  `json:"uptime"`
	OS      string `json:"os"`
	Arch    string `json:"arch"`
}

Jump to

Keyboard shortcuts

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