Documentation ¶
Index ¶
- Constants
- type APIConfig
- type App
- func (a *App) DeleteTelemetryReport(report *telemetrylib.TelemetryReport) (err error)
- func (a *App) Initialize()
- func (a *App) ListenOn() string
- func (a *App) ProcessBundles(report *telemetrylib.TelemetryReport) (err error)
- func (a *App) RegisterClient(ar *AppRequest)
- func (a *App) ReportTelemetry(ar *AppRequest)
- func (a *App) Run()
- func (a *App) StoreTelemetryData(dataItem *telemetrylib.TelemetryDataItem, ...) (err error)
- func (a *App) StoreTelemetryReport(reqBody []byte, key string) (err error)
- type AppRequest
- func (ar *AppRequest) ContentType(contentType string)
- func (ar *AppRequest) ContentTypeJSON()
- func (ar *AppRequest) ErrorResponse(code int, errorMessage string)
- func (ar *AppRequest) JsonResponse(code int, payload any)
- func (ar *AppRequest) Status(statusCode int)
- func (ar *AppRequest) StatusInternalServerError()
- func (ar *AppRequest) Write(data []byte) (code int, err error)
- type ClientsRow
- type Config
- type DBConfig
- type DbConnection
- type PQLConfig
- type ReportStagingTableRow
- type ServerAddress
- type TagSetRow
- type TelemetryDataRow
Constants ¶
View Source
const DEFAULT_CONFIG string = "/etc/susetelemetry/server.cfg"
Default server config path
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Config *Config TelemetryDB DbConnection StagingDB DbConnection Address ServerAddress Handler http.Handler }
App is a struct tracking the resources associated with the application
func (*App) DeleteTelemetryReport ¶
func (a *App) DeleteTelemetryReport(report *telemetrylib.TelemetryReport) (err error)
func (*App) Initialize ¶
func (a *App) Initialize()
func (*App) ProcessBundles ¶
func (a *App) ProcessBundles(report *telemetrylib.TelemetryReport) (err error)
func (*App) RegisterClient ¶
func (a *App) RegisterClient(ar *AppRequest)
RegisterClient is responsible for handling client registrations
func (*App) ReportTelemetry ¶
func (a *App) ReportTelemetry(ar *AppRequest)
func (*App) StoreTelemetryData ¶
func (a *App) StoreTelemetryData(dataItem *telemetrylib.TelemetryDataItem, bHeader *telemetrylib.TelemetryBundleHeader) (err error)
type AppRequest ¶
AppRequest is a struct tracking the resources associated with handling a request
func (*AppRequest) ContentType ¶
func (ar *AppRequest) ContentType(contentType string)
func (*AppRequest) ContentTypeJSON ¶
func (ar *AppRequest) ContentTypeJSON()
func (*AppRequest) ErrorResponse ¶
func (ar *AppRequest) ErrorResponse(code int, errorMessage string)
func (*AppRequest) JsonResponse ¶
func (ar *AppRequest) JsonResponse(code int, payload any)
func (*AppRequest) Status ¶
func (ar *AppRequest) Status(statusCode int)
func (*AppRequest) StatusInternalServerError ¶
func (ar *AppRequest) StatusInternalServerError()
type ClientsRow ¶
type ClientsRow struct { Id int64 `json:"id"` ClientInstanceId string `json:"clientInstanceId"` RegistrationDate string `json:"registrationDate"` AuthToken string `json:"authToken"` }
func (*ClientsRow) String ¶
func (c *ClientsRow) String() string
type Config ¶
type DbConnection ¶
DbConnection is a struct tracking a DB connection and associated DB settings
func (*DbConnection) Connect ¶
func (d *DbConnection) Connect() (err error)
func (*DbConnection) EnsureTablesExist ¶
func (d *DbConnection) EnsureTablesExist(tables map[string]string) (err error)
func (*DbConnection) Setup ¶
func (d *DbConnection) Setup(dbcfg DBConfig)
func (DbConnection) String ¶
func (d DbConnection) String() string
type ReportStagingTableRow ¶
type ReportStagingTableRow struct { Key string Data interface{} Processed bool ReceivedTimestamp string }
type ServerAddress ¶
ServerAddress is a struct tracking the server address
func (*ServerAddress) Setup ¶
func (s *ServerAddress) Setup(api APIConfig)
func (ServerAddress) String ¶
func (s ServerAddress) String() string
type TelemetryDataRow ¶
type TelemetryDataRow struct { Id int64 `json:"id"` ClientId int64 `json:"clientId"` CustomerId string `json:"customerId"` TelemetryId string `json:"telemetryId"` TelemetryType string `json:"telemetryType"` Timestamp string `json:"timestamp"` TagSetId int64 `json:"tagSetId"` Staged bool `json:"staged"` DataItem interface{} `json:"dataItem"` }
func (*TelemetryDataRow) String ¶
func (t *TelemetryDataRow) String() string
Click to show internal directories.
Click to hide internal directories.