MAJOR rework

- improves a lot on the Go side including better config and logging libraries (including log rotation), better internal package distribution, and new a3go functionality to make data transfer more performant
- SQF side preprocessing of capture data is now minimal - arrays in hashmap format are sent directly to the extension and parsed there to minimize game impact
- CBA custom events are implemented in a better fashion
- README update
- license change
- with performance improvements, the deep customization of integrated metric gathering is removed in return to a single refreshRateMs, defining the interval at which core metrics are captured
- peeled back the list of core metrics to the core information used in troubleshooting and benchmarking
This commit is contained in:
2023-10-10 00:44:50 -07:00
parent cf45d6b263
commit dc822c4c93
75 changed files with 4335 additions and 3347 deletions

13
.gitignore vendored
View File

@@ -1,12 +1,11 @@
*.pbo *.pbo
*.bak *.bak
*.dll *.dll
*.so *.so
*.exe
RangerMetrics.h
RangerMetrics_x64.h
settings.json
*.log *.log
ifxmetrics.config.json
.hemttout
influxdb

37
.hemtt/project.toml Normal file
View File

@@ -0,0 +1,37 @@
name ="IFX Server Metrics"
author ="IndigoFox"
prefix ="ifxmetrics"
mainprefix="x"
[version]
path ="addons/main/script_version.hpp" # Default
git_hash=6 # Default: 8
[files]
include=[
"ifxmetrics.config.json",
"LICENSE",
"README.md",
"mod.cpp",
"*.dll",
"*.so",
]
# Launched with `hemtt launch`
[hemtt.launch.default]
workshop=[
"450814997", # CBA_A3's Workshop ID
]
dlc=[]
optionals=[]
parameters=[
"-skipIntro", # These parameters are passed to the Arma 3 executable
"-noSplash", # They do not need to be added to your list
"-showScriptErrors", # You can add additional parameters here
"-debug",
"-filePatching",
]
[hemtt.release]
sign =false # Default: true
archive=true # Default: true

View File

@@ -1,86 +0,0 @@
/* Code generated by cmd/cgo; DO NOT EDIT. */
/* package main */
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H
#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
#endif
#endif
/* Start of preamble from import "C" comments. */
#line 3 "arma.go"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "extensionCallback.h"
#line 1 "cgo-generated-wrapper"
/* End of preamble from import "C" comments. */
/* Start of boilerplate cgo prologue. */
#line 1 "cgo-gcc-export-header-prolog"
#ifndef GO_CGO_PROLOGUE_H
#define GO_CGO_PROLOGUE_H
typedef signed char GoInt8;
typedef unsigned char GoUint8;
typedef short GoInt16;
typedef unsigned short GoUint16;
typedef int GoInt32;
typedef unsigned int GoUint32;
typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
/*
static assertion to make sure the file is being used on architecture
at least with matching size of GoInt.
*/
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef _GoString_ GoString;
#endif
typedef void *GoMap;
typedef void *GoChan;
typedef struct { void *t; void *v; } GoInterface;
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
#endif
/* End of boilerplate cgo prologue. */
#ifdef __cplusplus
extern "C" {
#endif
extern __declspec(dllexport) void goRVExtensionVersion(char* output, size_t outputsize);
extern __declspec(dllexport) void goRVExtensionArgs(char* output, size_t outputsize, char* input, char** argv, int argc);
extern __declspec(dllexport) void goRVExtension(char* output, size_t outputsize, char* input);
extern __declspec(dllexport) void goRVExtensionRegisterCallback(extensionCallback fnc);
#ifdef __cplusplus
}
#endif

View File

@@ -1,66 +0,0 @@
class CfgPatches {
class RangerMetrics {
units[] = {};
weapons[] = {};
requiredVersion = 2.10;
requiredAddons[] = {};
author[] = {"EagleTrooper","Gary","IndigoFox"};
authorUrl = "http://example.com";
};
};
class CfgFunctions {
class RangerMetrics_callback {
class functions {
file = "\RangerMetrics\functions\callbackHandlers";
class callbackHandler {};
class loadSettings {};
};
};
class RangerMetrics_cDefinitions {
class functions {
file = "\RangerMetrics\functions\captureDefinitions";
class server_poll {};
class server_missionEH {};
class client_EH {postInit = 1;};
// class clientEvent {};
class server_CBA {};
class unit_handlers {};
};
};
class RangerMetrics_capture {
// these names represent measurement names send to InfluxDB - snake case
class functions {
file = "\RangerMetrics\functions\capture";
class entity_count {};
class mission_config_file {};
class player_performance {};
class running_mission {};
class running_scripts {};
class server_performance {};
class server_time {};
class view_distance {};
class weather {};
class soldier_ammo {};
};
};
class RangerMetrics {
class core {
file = "\RangerMetrics\functions\core";
class postInit { postInit = 1; };
class captureLoop {};
class log {};
class send {};
class startServerPoll {};
class initCapture {};
};
class helpers {
file = "\RangerMetrics\functions\helpers";
class toLineProtocol {};
class encodeJSON {};
class stringReplace {};
class unixTimestamp {};
class getMagsAmmo {};
};
};
};

View File

@@ -1,84 +0,0 @@
params ["_name", "_function", "_data"];
if !(_name == "RangerMetrics") exitWith {};
// Validate data param
if (isNil "_data") then {_data = ""};
if (_data isEqualTo "") exitWith {
[
format ["Callback empty data: %1", _function],
"WARN"
] call RangerMetrics_fnc_log;
false;
};
// Parse response from string array
private "_response";
try {
// diag_log format ["Raw callback: %1: %2", _function, _data];
_response = parseSimpleArray _data;
} catch {
[
format ["Callback invalid data: %1: %2", _function, _data],
"WARN"
] call RangerMetrics_fnc_log;
};
switch (_function) do {
case "loadSettingsJSON": {
[_function, _response] call RangerMetrics_callback_fnc_loadSettings;
};
case "loadSettings": {
// Load settings
[_function, _response] call RangerMetrics_callback_fnc_loadSettings;
};
case "extensionReady": {
// deinitialize existing captures
if (!isNil "RangerMetrics_allMEH") then {
{
private _handle = missionNamespace getVariable _x;
if (isNil "_handle") then {continue};
private _EHName = (_x splitString "_") select 2;
removeMissionEventHandler [_EHName, _handle];
missionNamespace setVariable [_x, nil];
} forEach RangerMetrics_allMEH;
};
if (!isNil "RangerMetrics_allCBA") then {
{
private _handle = missionNamespace getVariable _x;
if (isNil "_handle") then {continue};
private _EHName = (_x splitString "_") select 2;
[_EHName, _handle] call CBA_fnc_removeEventHandler;
missionNamespace setVariable [_x, nil];
} forEach RangerMetrics_allCBA;
};
if (!isNil "RangerMetrics_allServerPoll") then {
{
private _handle = missionNamespace getVariable _x;
if (isNil "_handle") then {continue};
terminate _handle;
missionNamespace setVariable [_x, nil];
} forEach RangerMetrics_allServerPoll;
};
if (!isNil "RangerMetrics_sendHandler") then {
[RangerMetrics_sendHandler] call CBA_fnc_removePerFrameHandler;
missionNamespace setVariable ["RangerMetrics_sendHandler", nil];
};
if (
missionNamespace getVariable [
"RangerMetrics_run",
false
]
) then {
call RangerMetrics_fnc_initCapture;
};
};
default {
_response call RangerMetrics_fnc_log;
};
};

View File

@@ -1,54 +0,0 @@
params ["_function", "_data"];
if (_function isEqualTo "loadSettingsJSON") exitWith {
diag_log "RangerMetrics: loadSettingsJSON";
// diag_log text format["%1", _data#0];
RangerMetrics_settings = [_data#0] call CBA_fnc_parseJSON;
// diag_log text format["%1", RangerMetrics_settings];
RangerMetrics_recordingSettings = RangerMetrics_settings getVariable "recordingSettings";
RangerMetrics_debug = (RangerMetrics_settings getVariable "arma3") getVariable "debug";
[
"Settings loaded: %1",
"INFO"
] call RangerMetrics_fnc_log;
if (isServer) then {
missionNamespace setVariable [
"RangerMetrics_serverProfileName",
profileName,
true
];
};
};
switch (_data select 0) do {
case "CREATED SETTINGS": {
[
"settings.json did not exist and has been created - you will need to update it with your own settings before the addon will initialize further.",
"ERROR"
] call RangerMetrics_fnc_log;
};
case "loadSettings": {
[
format [
"Setting loaded: %1",
_data
],
"DEBUG"
] call RangerMetrics_fnc_log;
};
default {
[
_data select 0,
"DEBUG"
] call RangerMetrics_fnc_log;
};
};

View File

@@ -1,212 +0,0 @@
if (!RangerMetrics_run) exitWith {};
// get basic config properties
private _properties = [
["mission_info", [
"author",
"onLoadName",
"onLoadMission",
"loadScreen",
// "header",
"gameType",
"minPlayers",
"maxPlayers",
"onLoadIntro",
"onLoadMissionTime",
"onLoadIntroTime",
"briefingName",
"overviewPicture",
"overviewText",
"overviewTextLocked"
]],
["respawn", [
"respawn",
"respawnButton",
"respawnDelay",
"respawnVehicleDelay",
"respawnDialog",
"respawnOnStart",
"respawnTemplates",
"respawnTemplatesWest",
"respawnTemplatesEast",
"respawnTemplatesGuer",
"respawnTemplatesCiv",
"respawnWeapons",
"respawnMagazines",
"reviveMode",
"reviveUnconsciousStateMode",
"reviveRequiredTrait",
"reviveRequiredItems",
"reviveRequiredItemsFakConsumed",
"reviveMedicSpeedMultiplier",
"reviveDelay",
"reviveForceRespawnDelay",
"reviveBleedOutDelay",
"enablePlayerAddRespawn"
]],
["player_ui", [
"overrideFeedback",
"showHUD",
"showCompass",
"showGPS",
"showGroupIndicator",
"showMap",
"showNotePad",
"showPad",
"showWatch",
"showUAVFeed",
"showSquadRadar"
]],
["corpse_and_wreck", [
"corpseManagerMode",
"corpseLimit",
"corpseRemovalMinTime",
"corpseRemovalMaxTime",
"wreckManagerMode",
"wreckLimit",
"wreckRemovalMinTime",
"wreckRemovalMaxTime",
"minPlayerDistance"
]],
["mission_settings", [
"aiKills",
"briefing",
"debriefing",
"disableChannels",
"disabledAI",
"disableRandomization",
"enableDebugConsole",
"enableItemsDropping",
"enableTeamSwitch",
"forceRotorLibSimulation",
"joinUnassigned",
"minScore",
"avgScore",
"maxScore",
"onCheat",
"onPauseScript",
"saving",
"scriptedPlayer",
"skipLobby",
"HostDoesNotSkipLobby",
"missionGroup"
]
]
];
private _propertyValues = createHashMap;
// recursively walk through missionConfigFile and get all properties into a single hashmap
// iterate through list of categories with desired property names
// if the property exists in the extracted missionConfigFile property hash, save it with the category into _propertyValues
{
private _category = _x#0;
private _values = _x#1;
{
private _property = _x;
private _value = (missionConfigFile >> _property) call BIS_fnc_getCfgData;
// hint str [_category, _property, _value];
if (!isNil "_value") then {
if (typeName _value == "ARRAY") then {
_value = _value joinString ",";
};
if (isNil {_propertyValues get _category}) then {
_propertyValues set [_category, createHashMap];
};
_propertyValues get _category set [_property, _value];
};
} forEach _values;
} forEach _properties;
// Take the generated hashmap of custom-categorized configuration properties and queue them for metrics
{
private _measurementCategory = _x;
private _fields = _y;
private _fieldsWithType = [];
// InfluxDB lookup hash
_types = createHashMapFromArray [
["STRING", "string"],
["ARRAY", "string"],
["SCALAR", "float"],
["BOOL", "bool"]
];
// Preprocess the fields to clean the raw data
{
private _fieldName = _x;
private _fieldValue = _y;
private _fieldType = _types get (typeName _fieldValue);
// turn ARRAY into string since Influx can't take them
if (typeName _fieldValue == "ARRAY") then {
_fieldValue = _fieldValue joinString "|";
};
// convert 0 or 1 (from config) to BOOL
if (typeName _fieldValue == "SCALAR" && _fieldValue in [0, 1]) then {
_fieldType = "bool";
if (_fieldValue == 0) then {
_fieldValue = "false";
} else {
_fieldValue = "true";
};
};
_fieldsWithType pushBack [_fieldType, _fieldName, _fieldValue];
} forEach _fields;
// finally, send the data
[
"config_state",
"mission_config_file",
[
["category", _measurementCategory]
],
_fieldsWithType
] call RangerMetrics_fnc_send;
} forEach _propertyValues;
// get all properties in missionConfigFile (recursive)
// private _nextCfgClasses = "true" configClasses (missionConfigFile);
// private _nextCfgProperties = configProperties [missionConfigFile];
// private _cfgProperties = createHashMap;
// while {count _nextCfgClasses > 0} do {
// {
// private _thisConfig = _x;
// private _thisConfigClasses = "true" configClasses _thisConfig;
// _thisCfgProperties = configProperties [_thisConfig, "!isClass _x"];
// _saveHash = createHashMap;
// {
// _propertyCfg = _x;
// _saveHash set [configName _propertyCfg, (_propertyCfg) call BIS_fnc_getCfgData];
// } forEach _thisCfgProperties;
// _hierarchy = (configHierarchy _thisConfig);
// _hierarchy deleteAt 0;
// _hierarchy = _hierarchy apply {configName _x};
// _hierarchyStr = _hierarchy joinString ".";
// _hierarchyStrParent = (_hierarchy select [0, count _hierarchy - 2]) joinString ".";
// systemChat _hierarchyStrParent;
// // if (_cfgProperties get _hierarchyStrParent == nil) then {
// // _cfgProperties set [_hierarchyStrParent, createHashMap];
// // };
// _cfgProperties set [_hierarchyStr, _saveHash];
// // _cfgProperties set [_hierarchy, _saveHash];
// _nextCfgClasses append _thisConfigClasses;
// } forEach _nextCfgClasses;
// _nextCfgClasses = _nextCfgClasses - _cfgClasses;
// };
// text ([_cfgProperties] call RangerMetrics_fnc_encodeJSON);
// iterate through _cfgProperties hashmap and queue metrics
// {
// } forEach _cfgProperties;

View File

@@ -1,25 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "playerPerformance";
{
_x params ["_playerID", "_ownerId", "_playerUID", "_profileName", "_displayName", "_steamName", "_clientState", "_isHC", "_adminState", "_networkInfo", "_unit"];
_networkInfo params ["_avgPing", "_avgBandwidth", "_desync"];
if (_unit == objNull || _isHC) then {
continue;
};
[
_settings getVariable "bucket",
_settings getVariable "measurement",
[["string", "playerUID", _playerUID]],
[
["float", "avgPing", _avgPing],
["float", "avgBandwidth", _avgBandwidth],
["float", "desync", _desync]
],
["server"]
] call RangerMetrics_fnc_send;
} forEach (allUsers apply {getUserInfo _x});

View File

@@ -1,28 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "runningMission";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil, // tags
[ // fields
["string","briefing_name", briefingName],
["string","mission_name", missionName],
["string","mission_name_source", missionNameSource],
[
"string",
"on_load_name",
getMissionConfigValue ["onLoadName", ""]
],
["string","author", getMissionConfigValue ["author", ""]],
["string","server_name",serverName],
["int", "playable_slots_west", playableSlotsNumber west],
["int", "playable_slots_east", playableSlotsNumber east],
["int", "playable_slots_guer", playableSlotsNumber independent],
["int", "playable_slots_civ", playableSlotsNumber civilian],
["int", "playable_slots_logic", playableSlotsNumber sideLogic]
],
["profile", "server", "world"] // context
] call RangerMetrics_fnc_send;

View File

@@ -1,20 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "runningScripts";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil,
[
["int", "spawn", diag_activeScripts select 0],
["int", "execVM", diag_activeScripts select 1],
["int", "exec", diag_activeScripts select 2],
["int", "execFSM", diag_activeScripts select 3],
["int", "pfh",
if (RangerMetrics_cbaPresent) then {
count CBA_common_perFrameHandlerArray
} else {0}
]
]
] call RangerMetrics_fnc_send;

View File

@@ -1,11 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "serverPerformance";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil, [
["float", "fps_avg", diag_fps toFixed 2],
["float", "fps_min", diag_fpsMin toFixed 2]
]] call RangerMetrics_fnc_send;

View File

@@ -1,15 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "serverTime";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil,
[
["float", "diag_tickTime", diag_tickTime toFixed 2],
["float", "serverTime", time toFixed 2],
["float", "timeMultiplier", timeMultiplier toFixed 2],
["float", "accTime", accTime toFixed 2]
]
] call RangerMetrics_fnc_send;

View File

@@ -1,37 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "soldierAmmo";
// run for each side
{
private _side = _x;
private _allHash = createHashMap;
// run function and increment hash for each player
// the hash will wind up containing all mags and ammo count present for each soldier on this side
{
[_x, _allHash] call RangerMetrics_fnc_getMagsAmmo;
} forEach (allUnits select {side _x == _side && alive _x && !isNull _x});
{
private _class = _x;
_y params ["_displayName", "_magType", "_ammoCount"];
[
_settings getVariable "bucket",
_settings getVariable "measurement",
[ // tags
["string", "class", _class],
["string", "display_name", _displayName],
["string", "mag_type", _magType],
["string", "side", str _side]
],
[ // fields
["int" ,"ammo_count", round(_ammoCount)]
],
["profile", "server", "world"] // context
] call RangerMetrics_fnc_send;
} forEach _allHash;
// diag_log text format["RangerMetrics: %1 side complete, mags ammo: %2", _side, _allHash];
} forEach [west, east, independent, civilian];

View File

@@ -1,13 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "viewDistance";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil,
[
["float", "objectViewDistance", getObjectViewDistance # 0],
["float", "viewDistance", viewDistance]
]
] call RangerMetrics_fnc_send;

View File

@@ -1,23 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _settings = RangerMetrics_recordingSettings getVariable "weather";
[
_settings getVariable "bucket",
_settings getVariable "measurement",
nil, // tags
[ // fields
["float", "fog", fog],
["float", "overcast", overcast],
["float", "rain", rain],
["float", "humidity", humidity],
["float", "waves", waves],
["float", "windDir", windDir],
["float", "windStr", windStr],
["float", "gusts", gusts],
["float", "lightnings", lightnings],
["float", "moonIntensity", moonIntensity],
["float", "moonPhase", moonPhase date],
["float", "sunOrMoon", sunOrMoon]
]
] call RangerMetrics_fnc_send;

View File

@@ -1,37 +0,0 @@
if (!isServer) exitWith {};
// remoteExec to all machines with JIP -- will trigger when local
{
if (!hasInterface) exitWith {};
RangerMetrics_event_fnc_broadcastAceDamageSource = {
params ["_unit"];
private _aceLastDamage = _unit getVariable "ace_medical_lastDamageSource";
if (!isNil "_aceLastDamage") then {
_unit setVariable ["ace_medical_lastDamageSource", _aceLastDamage, 2];
};
};
player addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
[_unit] call RangerMetrics_event_fnc_broadcastAceDamageSource;
}];
player addEventHandler ["Respawn", {
params ["_unit", "_corpse"];
_unit addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
[_unit] call RangerMetrics_event_fnc_broadcastAceDamageSource;
}];
}];
addMissionEventHandler ["HandleChatMessage", {
params ["_channel", "_owner", "_from", "_text", "_person", "_name", "_strID", "_forcedDisplay", "_isPlayerMessage", "_sentenceType", "_chatMessageType"];
if !(missionNamespace getVariable ["RangerMetrics_run", false]) exitWith {};
if (_owner == clientOwner && parseNumber _strID > 1) then {
_this remoteExecCall ["RangerMetrics_event_fnc_HandleChatMessage", 2];
};
false;
}];
} remoteExec ["call", 0, true];

View File

@@ -1,8 +0,0 @@
[
// ["ace_unconscious", RangerMetrics_event_fnc_ace_unconscious],
[
"milsimServerEfficiency",
"milsim_serverEfficiency",
RangerMetrics_event_fnc_milsim_serverEfficiency
]
]

View File

@@ -1,153 +0,0 @@
[
["OnUserConnected", {
params ["_networkId", "_clientStateNumber", "_clientState"];
private _userInfo = (getUserInfo _networkId);
private _tags = [];
if (!isNil "_userInfo") then {
_tags pushBack ["string", "playerUID", _userInfo#2];
};
["server_events", "OnUserConnected",
_tags, [
["string", "networkId", _networkId],
["int", "clientStateNumber", _clientStateNumber],
["string", "clientState", _clientState]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) OnUserConnected fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["OnUserDisconnected", {
params ["_networkId", "_clientStateNumber", "_clientState"];
private _userInfo = (getUserInfo _networkId);
private _tags = [];
if (!isNil "_userInfo") then {
_tags pushBack ["string", "playerUID", _userInfo#2];
};
["server_events", "OnUserDisconnected",
_tags, [
["string", "networkId", _networkId],
["int", "clientStateNumber", _clientStateNumber],
["string", "clientState", _clientState]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) OnUserDisconnected fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["PlayerConnected", {
params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];
private _userInfo = (getUserInfo _idstr);
_userInfo call RangerMetrics_capture_fnc_player_identity;
_userInfo call RangerMetrics_capture_fnc_player_status;
// [_entity] call RangerMetrics_capture_fnc_unit_inventory;
["server_events", "PlayerConnected", [
["string", "playerUID", _uid]
], [
["string", "id", _id toFixed 0],
["string", "uid", _uid],
["string", "name", _name],
["bool", "jip", _jip],
["int", "owner", _owner],
["string", "idstr", _idstr]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) PlayerConnected fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["HandleDisconnect", {
params ["_unit", "_id", "_uid", "_name"];
private _userInfo = (getUserInfo (_id toFixed 0));
["server_events", "HandleDisconnect", [
["string", "playerUID", _uid]
], [
["string", "id", _id toFixed 0],
["string", "uid", _uid],
["string", "name", _name]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) HandleDisconnect fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
false;
}],
["OnUserClientStateChanged", {
params ["_networkId", "_clientStateNumber", "_clientState"];
private _userInfo = (getUserInfo _networkId);
["server_events", "OnUserClientStateChanged", [
["string", "playerUID", _userInfo#2]
], [
["string", "networkId", _networkId],
["int", "clientStateNumber", _clientStateNumber],
["string", "clientState", _clientState]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) OnUserClientStateChanged fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["OnUserAdminStateChanged", {
params ["_networkId", "_loggedIn", "_votedIn"];
private _userInfo = (getUserInfo _networkId);
if (isNil "_userInfo") exitWith {};
["server_events", "OnUserAdminStateChanged", [
["string", "playerUID", _userInfo#2]
], [
["string", "networkId", _networkId],
["bool", "loggedIn", _loggedIn],
["bool", "votedIn", _votedIn]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) OnUserAdminStateChanged fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["OnUserKicked", {
params ["_networkId", "_kickTypeNumber", "_kickType", "_kickReason", "_kickMessageIncReason"];
private _userInfo = (getUserInfo _networkId);
if (isNil "_userInfo") exitWith {};
["server_events", "OnUserKicked", [
["string", "playerUID", _userInfo#2]
], [
["string", "networkId", _networkId],
["int", "kickTypeNumber", _kickTypeNumber],
["string", "kickType", _kickType],
["string", "kickReason", _kickReason],
["string", "kickMessageIncReason", _kickMessageIncReason]
]] call RangerMetrics_fnc_send;
[format ["(EventHandler) OnUserKicked fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["HandleChatMessage", {
_this call RangerMetrics_event_fnc_HandleChatMessage;
// don't interfaere with the chat message
false;
}],
["MPEnded", {
private ["_winner", "_reason"];
_winner = "Unknown";
_reason = "Mission Complete";
["server_events", "MPEnded", nil, [
["string", "winner", _winner],
["string", "reason", _reason]
]] call RangerMetrics_fnc_send;
call RangerMetrics_capture_fnc_running_mission;
[format ["(EventHandler) MPEnded fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["EntityCreated", {
params ["_entity"];
if (
!(_entity isKindOf "AllVehicles")
) exitWith {};
call RangerMetrics_capture_fnc_entity_count;
[format["(EventHandler) EntityCreated fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["EntityKilled", {
params ["_entity"];
if (
!(_entity isKindOf "AllVehicles")
) exitWith {};
call RangerMetrics_capture_fnc_entity_count;
[format["(EventHandler) EntityKilled fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["EntityRespawned", {
params ["_newEntity", "_oldEntity"];
call RangerMetrics_capture_fnc_entity_count;
[format["(EventHandler) EntityRespawned fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["GroupCreated", {
params ["_group"];
call RangerMetrics_capture_fnc_entity_count;
[format["(EventHandler) GroupCreated fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}],
["GroupDeleted", {
params ["_group"];
call RangerMetrics_capture_fnc_entity_count;
[format["(EventHandler) GroupDeleted fired: %1", _this], "DEBUG"] call RangerMetrics_fnc_log;
}]
];

View File

@@ -1,46 +0,0 @@
[
[
"serverPerformance",
RangerMetrics_capture_fnc_server_performance
],
[
"runningScripts",
RangerMetrics_capture_fnc_running_scripts
],
[
"entityCount",
RangerMetrics_capture_fnc_entity_count
],
[
"playerPerformance",
RangerMetrics_capture_fnc_player_performance
],
[
"runningMission",
RangerMetrics_capture_fnc_running_mission
],
[
"serverTime",
RangerMetrics_capture_fnc_server_time
],
[
"weather",
RangerMetrics_capture_fnc_weather
],
[
"viewDistance",
RangerMetrics_capture_fnc_view_distance
],
[
"soldierAmmo",
RangerMetrics_capture_fnc_soldier_ammo
]
// [
// "playerInventory",
// {
// {
// [_x] call RangerMetrics_capture_fnc_unit_inventory;
// } count (call BIS_fnc_listPlayers);
// }
// ],
]

View File

@@ -1,205 +0,0 @@
params [
["_unit", objNull, [objNull]]
];
if (isNull _unit) exitWith {};
if (!isPlayer _unit) exitWith {};
// if ACE medical is running, remoteExec a Dammaged EH for the player's machine to send lastDamageSource from ACE to the server. this is used for EntityKilled EH and others.
if (RangerMetrics_aceMedicalPresent) then {
[_unit, {
params ["_unit"];
private _handle = _unit addEventHandler ["Dammaged", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
private _aceLastDamage = _unit getVariable "ace_medical_lastDamageSource";
if (!isNil "_aceLastDamage") then {
_unit setVariable ["ace_medical_lastDamageSource", _aceLastDamage, 2];
};
}];
_unit setVariable [
"RangerMetrics_UNITEH_Dammaged",
_handle
];
}] remoteExec ["call", owner _unit];
};
// explosion damage handler
[_unit, {
params ["_unit"];
private _handle = _unit addEventHandler ["Explosion", {
// params ["_vehicle", "_damage", "_source"];
_this remoteExec [
"RangerMetrics_event_fnc_Explosion", 2
];
}];
_unit setVariable [
"RangerMetrics_UNITEH_Explosion",
_handle
];
}] remoteExec ["call", 0, _unit];
// TODO
// server HitPart EH
// https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart
// _handle = _unit addEventHandler ["HitPart", {
// (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
// private _unitPlayerId = getPlayerId _unit;
// private _userInfo = getUserInfo _unitPlayerId;
// // workaround from wiki to get shooter playerUID
// if (isNull _projectile) exitWith {};
// private _shooterPlayerId = (getPlayerId (getShotParents _projectile select 1));
// private _shooterInfo = getUserInfo _shooterPlayerId;
// [
// "player_events",
// "HandleDamage",
// [
// ["string", "playerUID", _userInfo select 2]
// ],
// [
// ["string", "selection", _selection],
// ["number", "damage", _damage],
// ["number", "hitIndex", _hitIndex],
// ["string", "hitPoint", _hitPoint],
// ["string", "shooter", _shooterInfo select 2],
// ["string", "projectile", _projectile]
// ],
// ["server"]
// ] call RangerMetrics_fnc_send;
// [_unit] call RangerMetrics_capture_fnc_unit_state;
// }];
_handle = _unit addEventHandler [
"FiredMan", RangerMetrics_event_fnc_FiredMan
];
_unit setVariable [
"RangerMetrics_UNITEH_FiredMan",
_handle
];
_handle = _unit addEventHandler ["GetInMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
private _unitPlayerId = getPlayerId _unit;
private _userInfo = getUserInfo _unitPlayerId;
private _playerUID = "-1";
if (!isNil "_userInfo") then {
_playerUID = _userInfo select 2;
};
[
"player_events",
"GetInMan",
[
["string", "playerUID", _playerUID]
],
[
["string", "role", _role],
["string", "vehicle", _vehicle],
["string", "turret", _turret]
],
["server"]
] call RangerMetrics_fnc_send;
[_unit] call RangerMetrics_capture_fnc_unit_state;
}];
_unit setVariable [
"RangerMetrics_UNITEH_GetInMan",
_handle
];
_handle = _unit addEventHandler ["GetOutMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
private _unitPlayerId = getPlayerId _unit;
private _userInfo = getUserInfo _unitPlayerId;
private _playerUID = "-1";
if (!isNil "_userInfo") then {
_playerUID = _userInfo select 2;
};
[
"player_events",
"GetOutMan",
[
["string", "playerUID", _playerUID]
],
[
["string", "role", _role],
["string", "vehicle", _vehicle],
["string", "turret", _turret]
],
["server"]
] call RangerMetrics_fnc_send;
[_unit] call RangerMetrics_capture_fnc_unit_state;
}];
_unit setVariable [
"RangerMetrics_UNITEH_GetOutMan",
_handle
];
_handle = _unit addEventHandler ["HandleScore", {
params ["_unit", "_object", "_score"];
private _unitPlayerId = getPlayerId _unit;
private _userInfo = getUserInfo _unitPlayerId;
private _playerUID = "-1";
if (!isNil "_userInfo") then {
_playerUID = _userInfo select 2;
};
[
"player_events",
"HandleScore",
[
["string", "playerUID", _playerUID]
],
[
["int", "score", _score],
["string", "objectClass", typeOf _object],
["string", "object", [configOf _object] call BIS_fnc_displayName]
],
["server"]
] call RangerMetrics_fnc_send;
nil;
}];
_unit setVariable [
"RangerMetrics_UNITEH_HandleScore",
_handle
];
_handle = _unit addEventHandler ["InventoryClosed", {
params ["_unit", "_container"];
private _unitPlayerId = getPlayerId _unit;
private _userInfo = getUserInfo _unitPlayerId;
private _playerUID = "-1";
if (!isNil "_userInfo") then {
_playerUID = _userInfo select 2;
};
[
"player_events",
"InventoryClosed",
[
["string", "playerUID", _playerUID]
],
[
["string", "container", _container]
],
["server"]
] call RangerMetrics_fnc_send;
[_unit] call RangerMetrics_capture_fnc_unit_inventory;
nil;
}];
_unit setVariable [
"RangerMetrics_UNITEH_InventoryClosed",
_handle
];
true;

View File

@@ -1,24 +0,0 @@
if (!RangerMetrics_run) exitWith {};
private _startTime = diag_tickTime;
call RangerMetrics_capture_fnc_server_performance;
call RangerMetrics_capture_fnc_running_scripts;
call RangerMetrics_capture_fnc_server_time;
call RangerMetrics_capture_fnc_weather;
call RangerMetrics_capture_fnc_entities_local;
call RangerMetrics_capture_fnc_entities_global;
private _allUsers = allUsers apply {getUserInfo _x};
{
_x call RangerMetrics_capture_fnc_player_performance;
} forEach _allUsers;
// log the runtime and switch off debug so it doesn't flood the log
if (
missionNamespace getVariable ["RangerMetrics_debug",false]
) then {
[format ["Run time: %1", diag_tickTime - _startTime], "DEBUG"] call RangerMetrics_fnc_log;
// missionNamespace setVariable ["RangerMetrics_debug",false];
};

View File

@@ -1,115 +0,0 @@
// MISSION EH
{
if (!isServer) exitWith {};
_x params ["_ehName", "_code"];
_handle = (addMissionEventHandler [_ehName, _code]);
if (isNil "_handle") then {
[format["Failed to add Mission event handler: %1", _x], "ERROR"] call RangerMetrics_fnc_log;
false;
} else {
missionNamespace setVariable [
("RangerMetrics" + "_MEH_" + _ehName),
_handle
];
true;
};
} forEach (call RangerMetrics_cDefinitions_fnc_server_missionEH);
// SERVER POLLS
{
// for each definition in SQF, pair it to the settings imported from settings.json
// and then call the function to create the metric
// get the definition
_x params ["_name", "_code"];
// get the settings
private _settings = RangerMetrics_recordingSettings getVariable _name;
if (isNil "_settings") exitWith {};
if (count (allVariables _settings) == 0) exitWith {};
if (
(_settings getVariable "enabled") isNotEqualTo true ||
(
!isServer &&
(_settings getVariable "serverOnly") isNotEqualTo false
) ||
(hasInterface && !isServer)
) exitWith {};
// set up pfh
_x call RangerMetrics_fnc_startServerPoll;
} forEach (call RangerMetrics_cDefinitions_fnc_server_poll);
// CBA EVENTS
{
private "_handle";
_x params ["_settingName", "_handleName", "_code"];
private _settings = (RangerMetrics_recordingSettings getVariable "CBAEventHandlers") getVariable _settingName;
if (isNil "_settings") exitWith {};
if (count (keys _settings) == 0) exitWith {};
if (
(_settings getVariable "enabled") isNotEqualTo true ||
(
!isServer &&
(_settings getVariable "serverOnly") isNotEqualTo false
) ||
(hasInterface && !isServer)
) exitWith {};
_handle = ([_handleName, _code] call CBA_fnc_addEventHandlerArgs);
if (isNil "_handle") then {
[format["Failed to add CBA event handler: %1", _x], "ERROR"] call RangerMetrics_fnc_log;
false;
} else {
missionNamespace setVariable [
("RangerMetrics" + "_CBAEH_" + _handleName),
_handle
];
true;
};
} forEach (call RangerMetrics_cDefinitions_fnc_server_CBA);
RangerMetrics_allMEH = allVariables missionNamespace select {
_x find (toLower "RangerMetrics_MEH_") == 0
};
RangerMetrics_allCBA = allVariables missionNamespace select {
_x find (toLower "RangerMetrics_CBAEH_") == 0
};
RangerMetrics_allServerPoll = allVariables missionNamespace select {
_x find (toLower "RangerMetrics_serverPoll_") == 0
};
[format ["Mission event handlers: %1", RangerMetrics_allMEH]] call RangerMetrics_fnc_log;
[format ["CBA event handlers: %1", RangerMetrics_allCBA]] call RangerMetrics_fnc_log;
[format ["Server poll handles: %1", RangerMetrics_allServerPoll]] call RangerMetrics_fnc_log;
missionNamespace setVariable ["RangerMetrics_initialized", true, true];
missionNamespace setVariable ["RangerMetrics_run", true, true];
// start sending
RangerMetrics_sendHandler = [{
params ["_args", "_idPFH"];
if !(
missionNamespace getVariable [
"RangerMetrics_run",
false
]
) exitWith {};
if (scriptDone RangerMetrics_sendBatchHandle) then {
RangerMetrics_sendBatchHandle = [] spawn RangerMetrics_fnc_send;
};
// call RangerMetrics_fnc_send;
}, 2, []] call CBA_fnc_addPerFrameHandler;

View File

@@ -1,28 +0,0 @@
if (!isServer) exitWith {};
params [["_text","Log text invalid"], ["_logType","DEBUG"]];
if (typeName _this != "ARRAY") exitWith {
diag_log format ["RangerMetrics: Invalid log params: %1", _this];
};
if (typeName _text != "STRING") exitWith {
diag_log format ["RangerMetrics: Invalid log text: %1", _this];
};
if (typeName _logType != "STRING") exitWith {
diag_log format ["RangerMetrics: Invalid log type: %1", _this];
};
if (
_logType == "DEBUG" &&
!(missionNamespace getVariable ["RangerMetrics_debug", false])
) exitWith {};
private _textFormatted = format [
"[%1] %2: %3",
RangerMetrics_logPrefix,
_logType,
_text
];
diag_log text _textFormatted;

View File

@@ -1,29 +0,0 @@
// if (!isServer) exitWith {};
if (is3DEN || !isMultiplayer) exitWith {};
if (!isServer && hasInterface) exitWith {};
RangerMetrics = false call CBA_fnc_createNamespace;
RangerMetrics_cbaPresent = isClass(configFile >> "CfgPatches" >> "cba_main");
RangerMetrics_logPrefix = "RangerMetrics";
RangerMetrics_debug = true;
RangerMetrics_initialized = false;
RangerMetrics_run = false;
RangerMetrics_settings = createHashMap;
RangerMetrics_recordingSettings = createHashMap;
[format ["Instance name: %1", profileName]] call RangerMetrics_fnc_log;
[format ["CBA detected: %1", RangerMetrics_cbaPresent]] call RangerMetrics_fnc_log;
["Initializing v0.0.3"] call RangerMetrics_fnc_log;
// Create listener - extension calls are async, so we need to listen for the response
addMissionEventHandler [
"ExtensionCallback",
RangerMetrics_callback_fnc_callbackHandler
];
// Deinit to start fresh. See callback handler for the remainder of async init code
"RangerMetrics" callExtension "initExtension";

View File

@@ -1,63 +0,0 @@
params [
["_bucket", "default", [""]],
"_measurement",
["_tags", [], [[], nil]],
["_fields", [], [[], nil]],
["_tagContext", ["profile", "server"], [[]]]
];
// format[
// "profile=%1,world=%2,%3",
// profileName,
// toLower worldName,
// (_tags apply {format['%1=%2', _x#0, _x#1]}) joinString ","
// ],
if (_tagContext find "profile" > -1) then {
_tags pushBack ["string", "profileName", profileName];
};
if (_tagContext find "world" > -1) then {
_tags pushBack ["string", "world", toLower worldName];
};
if (_tagContext find "server" > -1) then {
private _serverProfile = missionNamespace getVariable [
"RangerMetrics_serverProfileName",
""
];
if (_serverProfile isNotEqualTo "") then {
_tags pushBack [
"string",
"connectedServer",
_serverProfile
];
};
};
private _outTags = _tags apply {
[_x, "tag"] call RangerMetrics_fnc_toLineProtocol
} select {!isNil "_x"};
// having no tags is OK
_outTags = _outTags joinString ",";
private _outFields = _fields apply {
[_x, "field"] call RangerMetrics_fnc_toLineProtocol
} select {!isNil "_x"};
// having no fields will cause an error
if (count _outFields isEqualTo 0) exitWith {};
_outFields = _outFields joinString ",";
private _extSend = format [
"%1,%2 %3 %4",
_measurement, // metric name
_outTags,
_outFields,
call RangerMetrics_fnc_unixTimestamp
];
"RangerMetrics" callExtension ["sendToInflux", [_bucket, _extSend]];
true;

View File

@@ -1,52 +0,0 @@
params ["_refName", "_code"];
private _intervalMs = (RangerMetrics_recordingSettings getVariable _refName) getVariable ["intervalMs", 1000];
if (isNil "_intervalMs") exitWith {
[format["No intervalMs found for serverPoll %1", _name]] call RangerMetrics_fnc_log;
};
private _interval = _intervalMs / 1000; // convert to seconds
// if interval is 0, just run once now at init
if (_interval == 0) exitWith {
[_code] call CBA_fnc_execNextFrame;
};
// run a constant scheduled loop
// private _runnerVar = "RangerMetrics" + "_serverPollRunner_" + _refName;
// missionNamespace setVariable [_runnerVar, scriptNull];
// private _spawnParams = [_refName, _code, _interval, _runnerVar];
// private _handle = _spawnParams spawn {
// params ["_refName", "_code", "_interval", "_runnerVar"];
// while {true} do {
// if (scriptDone (
// missionNamespace getVariable _runnerVar
// )) then {
// private _handle = [] spawn _code;
// missionNamespace setVariable [
// _runnerVar,
// _handle
// ];
// };
// // sleep _interval;
// sleep 2;
// };
// };
// missionNamespace setVariable [
// "RangerMetrics" + "_serverPoll_" + _refName,
// _handle
// ];
// USE PFH
private _handle = [{
params ["_args", "_idPFH"];
_args params ["_refName", "_code"];
[_code] call CBA_fnc_execNextFrame;
}, _interval, _this] call CBA_fnc_addPerFrameHandler;
missionNamespace setVariable [
"RangerMetrics" + "_serverPoll_" + _refName,
_handle
];

View File

@@ -1,107 +0,0 @@
/* ----------------------------------------------------------------------------
Function: CBA_fnc_encodeJSON
Description:
Serializes input to a JSON string. Can handle
- ARRAY
- BOOL
- CONTROL
- GROUP
- LOCATION
- NAMESPACE
- NIL (ANY)
- NUMBER
- OBJECT
- STRING
- TASK
- TEAM_MEMBER
- HASHMAP
- Everything else will simply be stringified.
Parameters:
_object - Object to serialize. <ARRAY, ...>
Returns:
_json - JSON string containing serialized object.
Examples:
(begin example)
private _settings = call CBA_fnc_createNamespace;
_settings setVariable ["enabled", true];
private _json = [_settings] call CBA_fnc_encodeJSON;
(end)
Author:
BaerMitUmlaut
---------------------------------------------------------------------------- */
params ["_object"];
if (isNil "_object") exitWith { "null" };
switch (typeName _object) do {
case "SCALAR";
case "BOOL": {
str _object;
};
case "STRING": {
{
_object = [_object, _x#0, _x#1] call CBA_fnc_replace;
} forEach [
["\", "\\"],
["""", "\"""],
[toString [8], "\b"],
[toString [12], "\f"],
[endl, "\n"],
[toString [10], "\n"],
[toString [13], "\r"],
[toString [9], "\t"]
];
// Stringify without escaping inter string quote marks.
"""" + _object + """"
};
case "ARRAY": {
if ([_object] call CBA_fnc_isHash) then {
private _json = (([_object] call CBA_fnc_hashKeys) apply {
private _name = _x;
private _value = [_object, _name] call CBA_fnc_hashGet;
format ["%1: %2", [_name] call CBA_fnc_encodeJSON, [_value] call CBA_fnc_encodeJSON]
}) joinString ", ";
"{" + _json + "}"
} else {
private _json = (_object apply {[_x] call CBA_fnc_encodeJSON}) joinString ", ";
"[" + _json + "]"
};
};
case "HASHMAP": {
private _json = ((_object toArray false) apply {
_x params ["_key", ["_value", objNull]];
if !(_key isEqualType "") then {
_key = str _key;
};
format ["%1: %2", [_key] call CBA_fnc_encodeJSON, [_value] call CBA_fnc_encodeJSON]
}) joinString ", ";
"{" + _json + "}"
};
default {
if !(typeName _object in (supportInfo "u:allVariables*" apply {_x splitString " " select 1})) exitWith {
[str _object] call CBA_fnc_encodeJSON
};
if (isNull _object) exitWith { "null" };
private _json = ((allVariables _object) apply {
private _name = _x;
private _value = _object getVariable [_name, objNull];
format ["%1: %2", [_name] call CBA_fnc_encodeJSON, [_value] call CBA_fnc_encodeJSON]
}) joinString ", ";
"{" + _json + "}"
};
};

View File

@@ -1,37 +0,0 @@
params [
["_unit", objNull, [objNull]],
["_hash", createHashMap, [createHashMap]]
];
_magazines = magazinesAmmoFull _unit;
{
_x params [
"_class",
"_ammoCount",
"_isLoaded",
"_magTypeBit"
];
private _magType = switch (_magTypeBit) do {
case -1: {""};
case 0: {"grenade"};
case 1: {"primaryMagazine"};
case 2: {"handgunMagazine"};
case 4: {"secondaryMagainze"};
case 4096: {"binocularMagazine"};
case 65536: {"vehicleMagazine"};
};
_config = (configFile >> "CfgMagazines" >> _class);
_dname = getText(_config >> "displayName");
private _existing = _hash getOrDefault [_class, [_dname, _magType, 0]];
_hash set [_class, [
_dname,
_magType,
(_existing#2) + _ammoCount
]];
} forEach _magazines;

View File

@@ -1,12 +0,0 @@
params [[
"_unit", objNull, [objNull]
]];
if (isNull _unit) exitWith {};
private _playerID = getPlayerID _unit;
private _userInfo = (getUserInfo _playerID);
_userInfo call RangerMetrics_capture_fnc_player_identity;
_userInfo call RangerMetrics_capture_fnc_player_status;
[_unit] call RangerMetrics_capture_fnc_unit_state;
[_unit] call RangerMetrics_capture_fnc_unit_inventory;

View File

@@ -1,39 +0,0 @@
//
// PX_fnc_stringReplace :: Replace substrings
// Author: Colin J.D. Stewart
// Usage: ["xxx is awesome, I love xxx!", "xxx" || [], "Arma"] call PX_fnc_stringReplace;
//
params["_str", "_find", "_replace"];
private["_return", "_len", "_pos"];
if !(_str isEqualType "") exitWith {
[
format[
"RangerMetrics_fnc_stringReplace: _str is not a string. %1",
_str
],
"WARN"
] call RangerMetrics_fnc_log;
str _str;
};
if (!(_find isEqualType [])) then {
_find = [_find];
};
{
_return = "";
_len = count _x;
_pos = _str find _x;
while {(_pos != -1) && (count _str > 0)} do {
_return = _return + (_str select [0, _pos]) + _replace;
_str = (_str select [_pos+_len]);
_pos = _str find _x;
};
_str = _return + _str;
} forEach _find;
_str;

View File

@@ -1,67 +0,0 @@
params ["_line", ["_section", "field", [""]]];
_line params [
["_valueType", "string", [""]],
["_key", "", [""]],
"_value"
];
// debug
// diag_log format["%1=%2", _key, _value];
if (isNil "_value") exitWith {
nil;
};
if (_value isEqualTo "") exitWith {
nil
};
if (_value isEqualType []) then {
_value = _value joinString ",";
// replace double quotes with single quotes
_value = [_value, '""', "'"] call RangerMetrics_fnc_stringReplace;
};
_key = [_key, ',', "\,"] call RangerMetrics_fnc_stringReplace;
_key = [_key, '=', "\="] call RangerMetrics_fnc_stringReplace;
_key = [_key, ' ', "\ "] call RangerMetrics_fnc_stringReplace;
if (_section isEqualTo "tag") exitWith {
switch (_valueType) do {
case "string": {
_value = [_value, ',', "\,"] call RangerMetrics_fnc_stringReplace;
_value = [_value, '=', "\="] call RangerMetrics_fnc_stringReplace;
_value = [_value, ' ', "\ "] call RangerMetrics_fnc_stringReplace;
_value = format['%1=%2', _key, _value];
};
case "int": {
_value = format['%1=%2i', _key, _value];
};
case "bool": {
_value = format['%1=%2', _key, ['true', 'false'] select _value];
};
case "float": {
_value = format['%1=%2', _key, _value];
};
};
_value;
};
if (_section isEqualTo "field") exitWith {
switch (_valueType) do {
case "string": {
_value = [_value, '\', "\\"] call RangerMetrics_fnc_stringReplace;
_value = [_value, '"', '\"'] call RangerMetrics_fnc_stringReplace;
_value = format['%1="%2"', _key, _value];
};
case "int": {
_value = format['%1=%2i', _key, _value];
};
case "bool": {
_value = format['%1=%2', _key, ['true', 'false'] select _value];
};
case "float": {
_value = format['%1=%2', _key, _value];
};
};
_value;
};

View File

@@ -1 +0,0 @@
(parseSimpleArray ("RangerMetrics" callExtension "getUnixTimeNano")) select 0;

View File

@@ -1,104 +0,0 @@
{
"influxdb": {
"enabled": true,
"host": "http://INFLUX_URL:8086",
"token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX_AUTH_TOKEN_XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org": "ORG_NAME"
},
"arma3": {
"debug": false
},
"recordingSettings": {
"serverPerformance": {
"name": "serverPerformance",
"enabled": true,
"serverOnly": false,
"intervalMs": 1000,
"bucket": "server_performance",
"measurement": "fps",
"description": "SERVER/HC POLL. Tracks average and minimum FPS. Polled on server (and HC) at specified interval."
},
"runningScripts": {
"name": "runningScripts",
"enabled": true,
"serverOnly": false,
"intervalMs": 1000,
"bucket": "server_performance",
"measurement": "running_scripts",
"description": "SERVER/HC POLL. Tracks the number of scripts running on the server (and HC). Polled on specified interval."
},
"entityCount": {
"name": "entityCount",
"enabled": true,
"serverOnly": false,
"intervalMs": 5000,
"bucket": "server_performance",
"measurement": "n/a",
"description": "SERVER/HC POLL. Tracks the number of entities on the server. Polled on server (and HC) at specified interval as well as on EntityCreated/EntityRespawned/EntityKilled events. Measurement is static, [entities_local, entities_remote, entities_global]."
},
"playerPerformance": {
"name": "playerPerformance",
"enabled": true,
"serverOnly": true,
"intervalMs": 3000,
"bucket": "player_performance",
"measurement": "network",
"description": "SERVER POLL. User network performance. Tracks average ping, average bandwidth, and desync. Polled by the server at specified interval. Not tracked from headless client."
},
"serverTime": {
"name": "serverTime",
"enabled": true,
"serverOnly": true,
"intervalMs": 2000,
"bucket": "mission_data",
"measurement": "server_time",
"description": "SERVER POLL. Tracks the server time. Always server-only. Runs at specified interval."
},
"weather": {
"name": "weather",
"enabled": true,
"serverOnly": true,
"intervalMs": 10000,
"bucket": "mission_data",
"measurement": "weather",
"description": "SERVER POLL. Tracks the weather on the server. Always server-only. Runs at specified interval."
},
"viewDistance": {
"name": "viewDistance",
"enabled": true,
"serverOnly": true,
"intervalMs": 10000,
"bucket": "mission_data",
"measurement": "view_distance",
"description": "SERVER POSTINIT, MPEnded. Tracks the view distance on the server. Always server-only. Runs at specified interval."
},
"runningMission": {
"name": "runningMission",
"enabled": true,
"serverOnly": true,
"intervalMs": 0,
"bucket": "mission_data",
"measurement": "running_mission",
"description": "SERVER POSTINIT, MPEnded. Tracks the name of the mission running on the server. Always server-only. Runs at the start (and tries at end) of the mission."
},
"soldierAmmo": {
"name": "soldierAmmo",
"enabled": true,
"serverOnly": true,
"intervalMs": 10000,
"bucket": "soldier_ammo",
"measurement": "soldier_ammo",
"description": "SERVER POLL. Tracks the ammo count of all units by side. Polled on server at specified interval."
},
"CBAEventHandlers": {
"milsimServerEfficiency": {
"name": "milsimServerEfficiency",
"enabled": true,
"serverOnly": true,
"bucket": "server_performance",
"measurement": "milsim_server_efficiency",
"description": "EVENTHANDLER. Tracks the efficiency of the server."
}
}
}
}

757
LICENSE
View File

@@ -1,674 +1,119 @@
GNU GENERAL PUBLIC LICENSE Copyright (c) 2023 <indigo@indigofox.dev>
Version 3, 29 June 2007
Brief summary of this Licence
PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE.
With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions:
Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material).
Noncommercial - You may not use this material for any commercial purposes.
Arma Only - You may not convert or adapt this material to be used in other games than Arma.
Share Alike - If you adapt, or build upon this material, you may distribute the resulting material only under the same license.
Full version of licence
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License - Share Alike ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Everyone is permitted to copy and distribute verbatim copies Section 1 Definitions
of this license document, but changing it is not allowed.
Preamble Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs.
Arma Public Share Alike Compatible License means a license listed at https://www.bohemia.net/community/licenses as essentially the equivalent of this Public License.
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
The GNU General Public License is a free, copyleft license for Section 2 Scope
software and other kinds of works.
The licenses for most software and other practical works are designed License grant
to take away your freedom to share and change the works. By contrast, Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
the GNU General Public License is intended to guarantee your freedom to reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and
share and change all versions of a program--to make sure it remains free produce, reproduce, and Share Adapted Material for NonCommercial and ArmaOnly purposes only.
software for all its users. We, the Free Software Foundation, use the Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
GNU General Public License for most of our software; it applies also to Term. The term of this Public License is specified in Section 6(a).
any other work released this way by its authors. You can apply it to Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
your programs, too. Downstream recipients.
Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
Additional offer from the Licensor Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapters License You apply.
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i).
Other rights
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
Patent and trademark rights are not licensed under this Public License.
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes.
When we speak of free software, we are referring to freedom, not Section 3 License Conditions
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you Your exercise of the Licensed Rights is expressly made subject to the following conditions.
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether Attribution
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps: If You Share the Licensed Material (including in modified form), You must:
(1) assert copyright on the software, and (2) offer you this License retain the following if it is supplied by the Licensor with the Licensed Material:
giving you legal permission to copy, distribute and/or modify it. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
a copyright notice;
a notice that refers to this Public License;
a notice that refers to the disclaimer of warranties;
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable.
ShareAlike
For the developers' and authors' protection, the GPL clearly explains In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
that there is no warranty for this free software. For both users' and The Adapters License You apply must be this Public License, or an Arma Public Share Alike Compatible License.
authors' sake, the GPL requires that modified versions be marked as You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
changed, so that their problems will not be attributed erroneously to You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
authors of previous versions.
Some devices are designed to deny users access to install or run Section 4 Sui Generis Database Rights
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only;
modification follow. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
TERMS AND CONDITIONS For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability
0. Definitions. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
"This License" refers to version 3 of the GNU General Public License. Section 6 Term and Termination
"Copyright" also means copyright-like laws that apply to other kinds of This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
License. Each licensee is addressed as "you". "Licensees" and automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
"recipients" may be individuals or organizations. upon express reinstatement by the Licensor.
To "modify" a work means to copy from or adapt all or part of the work For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
in a fashion requiring copyright permission, other than the making of an For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
exact copy. The resulting work is called a "modified version" of the Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
earlier work or a work "based on" the earlier work.
Section 7 Other Terms and Conditions
A "covered work" means either the unmodified Program or a work based
on the Program. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for Section 8 Interpretation
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying, For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
distribution (with or without modification), making available to the To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
public, and in some countries other activities as well. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through Bohemia Interactive Notices
a computer network, with no transfer of a copy, is not conveying.
Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor".
An interactive user interface displays "Appropriate Legal Notices" Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s.
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

160
README.md
View File

@@ -1,4 +1,4 @@
# RangerMetrics - Arma3 InfluxDB Metrics # IFX Metrics - Arma3 Server Performance
This addon is designed to capture data from Arma3 and send it to InfluxDB. The extension is written in Golang and uses a non-blocking Write API to send data to InfluxDB. This addon is designed to capture data from Arma3 and send it to InfluxDB. The extension is written in Golang and uses a non-blocking Write API to send data to InfluxDB.
@@ -8,50 +8,152 @@ The data in Influx can be used to create dashboards in Grafana.
## Setup ## Setup
### Settings.json ### ifxmetrics.config.json
Configure the options in settings.json. Copy the ifxmetrics.config.example.json as ifxmetrics.config.json and edit the values to match your environment.
### Custom CBA Events to Log Metrics
The `cbaEventHandlers` sectio0n of the JSON configuration is used to enable custom server-side event listeners. In this way, you can capture measurements from custom scripts and send it to InfluxDB.
> You can read more about the data format that InfluxDB uses [here](https://docs.influxdata.com/influxdb/v2/get-started/write/#line-protocol-elements).
In this implementation, the bucket and measurement are defined in the config file. A bucket is created if it doesn't exist when you first send data to it, so you don't need to create buckets manually. As a tradeoff for security's sake, **the ability to define new buckets to send data to is not exposed to the scripter**.
As a brief note, tags are indexed while fields are not. This means that categorization generally happens at the tag level, and every field you submit will be categorized by each tag you provide with that send.
In the below example, the `milsimServerEfficiency` event handler will send data to `server_performance` (bucket) -> `milsim_server_efficiency` (measurement). The fields durationMs and vehicleCount will be sent as fields -- each can be easily filtered by the tags provided.
```json
// configuration file
// ...
"cbaEventHandlers": {
"milsimServerEfficiency": {
"name": "milsimServerEfficiency",
"description": "EVENTHANDLER. Tracks the efficiency of the server.",
"enabled": true,
"bucket": "server_performance",
"measurement": "milsim_server_efficiency"
}
}
// ...
```
```sqf
// your custom SQF script
fnc_getServerEfficiency = {
private _startTime = diag_tickTime;
// make and delete 99 vehicles
for "_i" from 0 to 99 do {
_vehicle = createVehicle ["B_Heli_Transport_01_F", findEmptyPosition [[0,0,0], 100, 10], [], 0, "FLY"];
deleteVehicle _vehicle;
};
// get the time it took to make and delete 99 vehicles
private _endTime = diag_tickTime;
private _timeTaken = _endTime - _startTime;
// send the data to InfluxDB
["milsimServerEfficiency", [
[ // tags in hash format. must be string values!
["missionPhase", "init"],
["missionName", "My Mission"],
["missionType", "COOP"],
["serverName", "My Server"]
],
[ // fields in hash format. can be any type
["durationMs", _timeTaken],
["vehicleCount", 99]
]
]] call CBA_fnc_serverEvent;
};
```
---
### InfluxDB ### InfluxDB
InfluxDB is a time series database. It is used to store data points with a timestamp. InfluxDB is a time series database. It is used to store data points with a timestamp.
#### Required Buckets To set up a basic Docker instance with data persisted in your terminal's current working directory, run the following command:
- mission_data ```bash
- player_performance docker run -d -p 8086:8086 -v $PWD/influxdb/data:/var/lib/influxdb2 -v $PWD/influxdb/config:/etc/influxdb2 -e DOCKER_INFLUXDB_INIT_MODE=setup -e DOCKER_INFLUXDB_INIT_USERNAME=myuser -e DOCKER_INFLUXDB_INIT_PASSWORD=dfaow3ho9i7funa0w3nv -e DOCKER_INFLUXDB_INIT_ORG=ifx-metrics -e DOCKER_INFLUXDB_INIT_BUCKET=test-bucket -e DOCKER_INFLUXDB_INIT_RETENTION=1w -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=f0982q3ahfu8yawbo27w8fb986ba90b0wb2f influxdb:latest
- server_performance ```
- server_events
- soldier_ammo This will create a new InfluxDB instance with the following credentials:
| Username | Password |
| --- | --- |
| myuser | dfaow3ho9i7funa0w3nv |
The database will be created with the following settings:
| Organization | Bucket | Retention |
| --- | --- | --- |
| ifx-metrics | test-bucket | 1 week |
The admin token, which is used with the InfluxDB API and CLI for administration, is:
| Token |
| --- |
| f0982q3ahfu8yawbo27w8fb986ba90b0wb2f |
Your InfluxDB instance will be available at <http://localhost:8086>.
### Grafana ### Grafana
Grafana is a dashboarding tool. It is used to display the data from InfluxDB. Import the dashboard from the json file in the root of this addon and set up your datasources appropriately. Grafana is a dashboarding tool. It is used to display the data from InfluxDB. A sample dashboard is provided as a starting point.
--- ---
## Usage ## BUILDING
### Ingame Set an environment variable in your terminal with the desired extension build version. It defaults to "DEVELOPMENT".
#### Toggle Capture On/Off ```powershell
# powershell
Running the following commands in Server Exec will toggle the capture on or off for the server and any Headless Clients. Capture loops will still occur but will exit almost immediately. $IFXMETRICS_BUILD_VER = "0.1.0-$(Get-Date -Format 'yyyyMMdd')-$(git rev-parse --short HEAD)"
Change the last parameter to false to ONLY target the server when run as Server Exec.
*This may not apply to raw Event Handler data which goes under `server_events`*
```sqf
// ON
missionNamespace setVariable ["RangerMetrics_run", true, true];
// OFF
missionNamespace setVariable ["RangerMetrics_run", false, true];
``` ```
#### Reload Settings.json and recreate all capture loops ```bash
# bash
export IFXMETRICS_BUILD_VER="0.1.0-$(date -u '+%Y%m%d')-$(git rev-parse --short HEAD)"
```
To reload everything while in a game, run `"RangerMetrics" callExtension "initExtension";` in Global Exec. This will disconnect any database connections and reset state. Running it Global Exec will cause any client with the addon to run it, which includes Headless Clients. ### EXTENSION: COMPILING FOR WINDOWS
When the extension is finished, it will notify Arma via a callback. The addon will then __automatically__ reinitialize the extension, to include fetching the new settings, tearing down existing captures, and re-setting up captures with the new settings. Run this from the project root.
```powershell
docker pull x1unix/go-mingw:1.20
# Compile x64 Windows DLL
docker run --rm -it -v ${PWD}:/go/work -w /go/work -e GOARCH=amd64 -e CGO_ENABLED=1 x1unix/go-mingw:1.20 go build -o ./ifxmetrics_x64.dll -buildmode=c-shared -ldflags "-w -s main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
# Compile x86 Windows DLL
docker run --rm -it -v ${PWD}:/go/work -w /go/work -e GOARCH=386 -e CGO_ENABLED=1 x1unix/go-mingw:1.20 go build -o ./ifxmetrics.dll -buildmode=c-shared -ldflags "-w -s main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
# Compile x64 Windows EXE
docker run --rm -it -v ${PWD}:/go/work -w /go/work -e GOARCH=amd64 -e CGO_ENABLED=1 x1unix/go-mingw:1.20 go build -o ./ifxmetrics_x64.exe -ldflags "-w -s main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
```
### EXTENSION: COMPILING FOR LINUX
Run this from the project root.
```powershell
docker build -t indifox926/build-a3go:linux-so -f ./build/Dockerfile.build .
# Compile x64 Linux .so
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=amd64 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o ./ifxmetrics_x64.so -linkshared -ldflags "-w -s main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
# Compile x86 Linux .so
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o ./ifxmetrics.so -linkshared -ldflags "-w -s main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
```
### ADDON: COMPILE USING HEMTT
Download the [HEMTT binary](https://github.com/BrettMayson/HEMTT/releases/latest) and place it in the project root. The configuration inside will be read by the HEMTT exe and defines the build process.
```powershell
./hemtt.exe release
```

View File

@@ -0,0 +1 @@
x\ifxmetrics\addons\capture

26
addons/capture/config.cpp Normal file
View File

@@ -0,0 +1,26 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = 2.10;
requiredAddons[] = {"cba_main"};
author[] = {"IndigoFox"};
authorUrl = "https://github.com/indig0fox/IFXMetrics";
};
};
class CfgFunctions {
class ADDON {
class functions {
PATHTO_FNC(entity_count);
PATHTO_FNC(player_performance);
PATHTO_FNC(running_mission);
PATHTO_FNC(running_scripts);
PATHTO_FNC(server_performance);
PATHTO_FNC(server_time);
PATHTO_FNC(weather);
};
};
};

View File

@@ -1,7 +1,6 @@
if (!RangerMetrics_run) exitWith {}; #include "script_component.hpp"
private _settings = RangerMetrics_recordingSettings getVariable "entityCount";
private _hashesOut = [];
private _allUnits = allUnits; private _allUnits = allUnits;
private _allDeadMen = allDeadMen; private _allDeadMen = allDeadMen;
@@ -12,122 +11,119 @@ private _allPlayers = call BIS_fnc_listPlayers;
private _thisSide = _x; private _thisSide = _x;
private _thisSideStr = _thisSide call BIS_fnc_sideNameUnlocalized; private _thisSideStr = _thisSide call BIS_fnc_sideNameUnlocalized;
// Number of remote units // Number of remote units
[ _hashesOut pushBack ([
_settings getVariable "bucket", ["bucket", "server_performance"],
"entities_remote", ["measurement", "entities_remote"],
[ ["tags", GVARMAIN(standardTags)],
["string", "side", _thisSideStr] ["fields", [
], [ ["units_alive", {
["int", "units_alive", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
not (local _x) not (local _x)
} count _allUnits], } count _allUnits],
["int", "units_dead", { ["units_dead", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
not (local _x) not (local _x)
} count _allDeadMen], } count _allDeadMen],
["int", "groups_total", { ["groups_total", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
not (local _x) not (local _x)
} count _allGroups], } count _allGroups],
["int", "vehicles_total", { ["vehicles_total", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
not (local _x) && not (local _x) &&
!(_x isKindOf "WeaponHolderSimulated") !(_x isKindOf "WeaponHolderSimulated")
} count _vehicles], } count _vehicles],
["int", "vehicles_weaponholder", { ["vehicles_weaponholder", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
not (local _x) && not (local _x) &&
(_x isKindOf "WeaponHolderSimulated") (_x isKindOf "WeaponHolderSimulated")
} count _vehicles] } count _vehicles]
] ]]
] call RangerMetrics_fnc_send; ]);
// Number of local units // Number of local units
[ _hashesOut pushBack ([
_settings getVariable "bucket", ["bucket", "server_performance"],
"entities_local", ["measurement", "entities_local"],
[ ["tags", GVARMAIN(standardTags)],
["string", "side", _thisSideStr] ["fields", [
], [ ["units_alive", {
["int", "units_alive", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
local _x local _x
} count _allUnits], } count _allUnits],
["int", "units_dead", { ["units_dead", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
local _x local _x
} count _allDeadMen], } count _allDeadMen],
["int", "groups_total", { ["groups_total", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
local _x local _x
} count _allGroups], } count _allGroups],
["int", "vehicles_total", { ["vehicles_total", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
local _x && local _x &&
!(_x isKindOf "WeaponHolderSimulated") !(_x isKindOf "WeaponHolderSimulated")
} count _vehicles], } count _vehicles],
["int", "vehicles_weaponholder", { ["vehicles_weaponholder", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
local _x && local _x &&
(_x isKindOf "WeaponHolderSimulated") (_x isKindOf "WeaponHolderSimulated")
} count _vehicles] } count _vehicles]
] ]]
] call RangerMetrics_fnc_send; ]);
// Number of global units - only track on server // Number of global units - only track on server
if (isServer) then { if (isServer) then {
[ _hashesOut pushBack ([
_settings getVariable "bucket", ["bucket", "server_performance"],
"entities_global", ["measurement", "entities_global"],
[ ["tags", GVARMAIN(standardTags)],
["string", "side", _thisSideStr] ["fields", [
], [ ["units_alive", {
["int", "units_alive", {
side _x isEqualTo _thisSide side _x isEqualTo _thisSide
} count _allUnits], } count _allUnits],
["int", "units_dead", { ["units_dead", {
side _x isEqualTo _thisSide side _x isEqualTo _thisSide
} count _allDeadMen], } count _allDeadMen],
["int", "groups_total", { ["groups_total", {
side _x isEqualTo _thisSide side _x isEqualTo _thisSide
} count _allGroups], } count _allGroups],
["int", "vehicles_total", { ["vehicles_total", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
!(_x isKindOf "WeaponHolderSimulated") !(_x isKindOf "WeaponHolderSimulated")
} count _vehicles], } count _vehicles],
["int", "vehicles_weaponholder", { ["vehicles_weaponholder", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
(_x isKindOf "WeaponHolderSimulated") (_x isKindOf "WeaponHolderSimulated")
} count _vehicles], } count _vehicles],
["int", "players_alive", { ["players_alive", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
alive _x alive _x
} count _allPlayers], } count _allPlayers],
["int", "players_dead", { ["players_dead", {
side _x isEqualTo _thisSide && side _x isEqualTo _thisSide &&
!alive _x !alive _x
} count _allPlayers] } count _allPlayers]
] ]]
] call RangerMetrics_fnc_send; ]);
}; };
} forEach [east, west, independent, civilian]; } forEach [east, west, independent, civilian];
if (isServer) then { if (isServer) then {
[ _hashesOut pushBack ([
_settings getVariable "bucket", ["bucket", "server_performance"],
"player_count", ["measurement", "player_count"],
nil, ["tags", GVARMAIN(standardTags)],
[ ["fields", [
["int", "players_connected", { ["players_connected", {
private _info = getUserInfo (getPlayerId _x); private _info = getUserInfo (getPlayerId _x);
if (!isNil "_info" && {count _info >= 6}) then { if (!isNil "_info" && {count _info >= 6}) then {
_info select 7 _info select 7
} else {false} } else {false}
} count _allPlayers] } count _allPlayers]
] ]]
] call RangerMetrics_fnc_send; ]);
}; };
_hashesOut;

View File

@@ -0,0 +1,28 @@
#include "script_component.hpp"
private _hashesOut = [];
{
_x params ["_playerID", "_ownerId", "_playerUID", "_profileName", "_displayName", "_steamName", "_clientState", "_isHC", "_adminState", "_networkInfo", "_unit"];
_networkInfo params ["_avgPing", "_avgBandwidth", "_desync"];
if (_unit == objNull || _isHC) then {
continue;
};
_tags = +GVARMAIN(standardTags);
_tags pushBack ["playerUID", _playerUID];
_tags pushBack ["playerName", _profileName];
_hashesOut pushBack ([
["bucket", "player_performance"],
["measurement", "network"],
["tags", _tags],
["fields", [
["avgPing", _avgPing],
["avgBandwidth", _avgBandwidth],
["desync", _desync]
]]
]);
} forEach (allUsers apply {getUserInfo _x});
_hashesOut;

View File

@@ -0,0 +1,23 @@
#include "script_component.hpp"
[
["bucket", "mission_data"],
["measurement", "loaded_info"],
["tags", GVARMAIN(standardTags)],
["fields", [
["briefing_name", briefingName],
["mission_name", missionName],
["mission_name_source", missionNameSource],
[
"on_load_name",
getMissionConfigValue ["onLoadName", "Unknown"]
],
["author", getMissionConfigValue ["author", "Unknown"]],
["server_name", serverName],
["playable_slots_west", playableSlotsNumber west],
["playable_slots_east", playableSlotsNumber east],
["playable_slots_guer", playableSlotsNumber independent],
["playable_slots_civ", playableSlotsNumber civilian],
["playable_slots_logic", playableSlotsNumber sideLogic]
]]
];

View File

@@ -0,0 +1,18 @@
#include "script_component.hpp"
[
["bucket", "server_performance"],
["measurement", "running_scripts"],
["tags", GVARMAIN(standardTags)],
["fields", [
["spawn", diag_activeScripts select 0],
["execVM", diag_activeScripts select 1],
["exec", diag_activeScripts select 2],
["execFSM", diag_activeScripts select 3],
["pfh",
if (GVARMAIN(cbaLoaded)) then {
count CBA_common_perFrameHandlerArray
} else {0}
]
]]
];

View File

@@ -0,0 +1,11 @@
#include "script_component.hpp"
[
["bucket", "server_performance"],
["measurement", "fps"],
["tags", GVARMAIN(standardTags)],
["fields", [
["fps_avg", diag_fps],
["fps_min", diag_fpsMin]
]]
];

View File

@@ -0,0 +1,13 @@
#include "script_component.hpp"
[
["bucket", "mission_data"],
["measurement", "server_time"],
["tags", GVARMAIN(standardTags)],
["fields", [
["diag_tickTime", diag_tickTime],
["serverTime", time],
["timeMultiplier", timeMultiplier],
["accTime", accTime]
]]
];

View File

@@ -0,0 +1,21 @@
#include "script_component.hpp"
[
["bucket", "mission_data"],
["measurement", "weather"],
["tags", GVARMAIN(standardTags)],
["fields", [
["fog", fog],
["overcast", overcast],
["rain", rain],
["humidity", humidity],
["waves", waves],
["windDir", windDir],
["windStr", windStr],
["gusts", gusts],
["lightnings", lightnings],
["moonIntensity", moonIntensity],
["moonPhase", moonPhase date],
["sunOrMoon", sunOrMoon]
]]
];

View File

@@ -0,0 +1,4 @@
#define COMPONENT capture
#define COMPONENT_BEAUTIFIED Capture
#include "\x\ifxmetrics\addons\main\script_mod.hpp"

1
addons/main/$PBOPREFIX$ Normal file
View File

@@ -0,0 +1 @@
x\ifxmetrics\addons\main

27
addons/main/config.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = 2.10;
requiredAddons[] = {};
author[] = {"IndigoFox"};
authorUrl = "https://github.com/indig0fox/IFXMetrics";
};
};
class CfgFunctions {
class ADDON {
class functions {
class postInit {
file = QPATHTOF(DOUBLES(fnc,postInit).sqf);
postInit = 1;
};
PATHTO_FNC(callbackHandler);
PATHTO_FNC(captureLoop);
PATHTO_FNC(log);
PATHTO_FNC(onExtLoad);
};
};
};

View File

@@ -0,0 +1,37 @@
#include "script_component.hpp"
params ["_name", "_function", "_data"];
if !(_name == GVARMAIN(extensionName)) exitWith {};
// Validate data param
if (isNil "_data") then {_data = ""};
if (_data isEqualTo "") exitWith {
[
"WARN",
format ["Callback empty data: %1", _function]
] call FUNC(log);
false;
};
private _dataArr = parseSimpleArray _data;
if (
(count _dataArr isEqualTo 0) &&
(_function isNotEqualTo ":LOG:")
) exitWith {
[
"WARN",
format ["Callback invalid data for function %1: %2", _function, _data]
] call FUNC(log);
false;
};
switch (_function) do {
case ":LOG:": {
diag_log formatText ["[%1] %2", GVARMAIN(logPrefix), _dataArr#0];
};
default {
["INFO", _data] call FUNC(log);
};
};

View File

@@ -0,0 +1,65 @@
#include "script_component.hpp"
/*
Parameters
_function The function you wish to execute. <CODE>
_delay The amount of time in seconds between executions, 0 for every frame. (optional, default: 0) <NUMBER>
_args Parameters passed to the function executing. (optional) <ANY>
_start Function that is executed when the PFH is added. (optional) <CODE>
_end Function that is executed when the PFH is removed. (optional) <CODE>
_runCondition Condition that has to return true for the PFH to be executed. (optional, default {true}) <CODE>
_exitCondition Condition that has to return true to delete the PFH object. (optional, default {false}) <CODE>
_private List of local variables that are serialized between executions. (optional) <CODE>
*/
GVARMAIN(captureLoop) = [
{
private _startTime = diag_tickTime;
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[
call EFUNC(capture,server_performance),
call EFUNC(capture,running_scripts),
call EFUNC(capture,server_time),
call EFUNC(capture,weather)
]
];
// entity_count returns an array of hashMap
{
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[_x]
];
} forEach (call EFUNC(capture,entity_count));
{
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[_x]
];
} forEach (call EFUNC(capture,player_performance));
["DEBUG", format[
"Processed primary data loop in %1 ms",
(diag_tickTime - _startTime) * 1000
]] call FUNC(log);
},
(GVARMAIN(refreshRateMs) / 1000), // delay in seconds,
[], // args
{
// start
["DEBUG", "Starting server performance capture"] call FUNC(log);
},
{
// end
["DEBUG", "Stopping server performance capture"] call FUNC(log);
},
{
// runCondition
true
},
{
// exitCondition
false
},
[] // private
] call CBA_fnc_createPerFrameHandlerObject;

27
addons/main/fnc_log.sqf Normal file
View File

@@ -0,0 +1,27 @@
#include "script_component.hpp"
if (!isServer) exitWith {};
if (typeName _this != "ARRAY") exitWith {
diag_log format ["[%1]: Invalid log params: %2", GVARMAIN(logPrefix), _this];
};
params [
["_level", "INFO", [""]],
["_text", "", [""]]
];
if (
_level == "DEBUG" &&
!GVARMAIN(debug)
) exitWith {};
if (_text isEqualTo "") exitWith {};
diag_log formatText [
"[%1] %2: %3",
GVARMAIN(logPrefix),
_level,
_text
];

View File

@@ -0,0 +1,121 @@
#include "script_component.hpp"
// wait until READY
waitUntil {
sleep 2;
(GVARMAIN(extensionName) callExtension ":READY:") isEqualTo "true";
};
// load settings from extension
private _settings = GVARMAIN(extensionName) callExtension ":SETTINGS:";
if (isNil "_settings") exitWith {
diag_log formatText[
"[%1] (ERROR): IFXMetrics extension settings not loaded. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
_settingsArr = parseSimpleArray _settings;
GVARMAIN(enabled) = _settingsArr select 0;
GVARMAIN(debug) = _settingsArr select 1;
GVARMAIN(refreshRateMs) = _settingsArr select 2;
if (!GVARMAIN(enabled)) exitWith {
diag_log formatText[
"[%1] (WARN): IFXMetrics config entry influxdb.enabled is false. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
// get custom CBA handlers
private _handlersFromExtension = GVARMAIN(extensionName) callExtension ":CUSTOM:CBA:EVENTS:";
_handlersFromExtension = parseSimpleArray _handlersFromExtension;
if (count _handlersFromExtension isEqualTo 0) then {
diag_log formatText[
"[%1] (WARN): IFXMetrics custom CBA handlers failed to parse. Custom events will not be logged.",
GVARMAIN(logPrefix)
];
} else {
diag_log formatText[
"[%1] (INFO): IFXMetrics custom CBA handlers loaded: %2",
GVARMAIN(logPrefix),
_handlersFromExtension
];
// data is a keyed HashMap
GVARMAIN(cbaHandlers) = createHashMapFromArray _handlersFromExtension;
};
GVARMAIN(standardTags) = [
["profile", profileName],
["world", worldName],
["server", serverName]
];
// Connect to InfluxDB
GVARMAIN(extensionName) callExtension ":INFLUX:CONNECT:";
waitUntil {
sleep 2;
(GVARMAIN(extensionName) callExtension ":INFLUX:CONNECTED:") isEqualTo "true";
};
// Send initial mission info
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[(call EFUNC(capture,running_mission))]
];
// Set up CBA event listeners
/* example usage:
["milsimServerEfficiency", [
["tags", [ // tags must be string values!
["missionPhase", "init"]
]],
["fields", [ // fields can be any type
["value", 0.5]
["numberOfShinyObjects", 3]
]]
]] call CBA_fnc_serverEvent;
*/
{
_key = _x;
_hash = _y;
[
_hash get "eventName", // event name
{ // function
_thisArgs params [
"_enabled",
"_bucket",
"_measurement",
"_description"
];
private _data = [
["bucket", _bucket],
["measurement", _measurement],
["tags", GVARMAIN(standardTags)],
["fields", _this]
];
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[_data]
];
},
[ // args
_hash get "enabled",
_hash get "bucket",
_hash get "measurement",
_hash get "description"
]
] call CBA_fnc_addEventHandlerArgs;
} forEach GVARMAIN(cbaHandlers);
// wait five seconds, then start the loop
[{call FUNC(captureLoop);}, 5] call CBA_fnc_waitAndExecute;

View File

@@ -0,0 +1,159 @@
#include "script_component.hpp"
// if (!isServer) exitWith {};
if (is3DEN || !isMultiplayer) exitWith {};
if (!isServer && hasInterface) exitWith {};
GVARMAIN(cbaLoaded) = isClass(configFile >> "CfgPatches" >> "cba_main");
GVARMAIN(logPrefix) = QUOTE(PREFIX_BEAUTIFIED);
GVARMAIN(extensionName) = QUOTE(PREFIX);
// Create listener for async callbacks
addMissionEventHandler [
"ExtensionCallback",
FUNC(callbackHandler)
];
// start loading the extension
[(parseSimpleArray (GVARMAIN(extensionName) callExtension ":START:")) select 0] remoteExec ["systemChat", 0];
// load settings from extension
private _settings = GVARMAIN(extensionName) callExtension ":SETTINGS:";
if (isNil "_settings") exitWith {
diag_log formatText[
"[%1] (ERROR): IFXMetrics extension settings not loaded. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
_settingsArr = parseSimpleArray _settings;
GVARMAIN(enabled) = _settingsArr select 0;
GVARMAIN(debug) = _settingsArr select 1;
GVARMAIN(refreshRateMs) = _settingsArr select 2;
if (!GVARMAIN(enabled)) exitWith {
diag_log formatText[
"[%1] (WARN): IFXMetrics config entry influxdb.enabled is false. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
// get custom CBA handlers
private _handlersFromExtension = GVARMAIN(extensionName) callExtension ":CUSTOM:CBA:EVENTS:";
_handlersFromExtension = parseSimpleArray _handlersFromExtension;
if (count _handlersFromExtension isEqualTo 0) then {
diag_log formatText[
"[%1] (WARN): IFXMetrics custom CBA handlers failed to parse. Custom events will not be logged.",
GVARMAIN(logPrefix)
];
} else {
diag_log formatText[
"[%1] (INFO): IFXMetrics custom CBA handlers loaded: %2",
GVARMAIN(logPrefix),
_handlersFromExtension
];
// data is a keyed HashMap
GVARMAIN(cbaHandlers) = createHashMapFromArray _handlersFromExtension;
};
GVARMAIN(standardTags) = [
["profile", profileName],
["world", worldName],
["server", serverName]
];
// Connect to InfluxDB
private _connectResult = parseSimpleArray (GVARMAIN(extensionName) callExtension ":INFLUX:CONNECT:");
if (count _connectResult isEqualTo 0) exitWith {
diag_log formatText[
"[%1] (ERROR): IFXMetrics failed to connect to InfluxDB. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
if (_connectResult select 0 isNotEqualTo "OK") exitWith {
diag_log formatText[
"[%1] (ERROR): IFXMetrics failed to connect to InfluxDB. IFXMetrics will not be available.",
GVARMAIN(logPrefix)
];
};
[format ["%1", (_connectResult select 1)]] remoteExec ["systemChat", 0];
// Send initial mission info
[
"DEBUG",
str (call EFUNC(capture,running_mission))
] call FUNC(log);
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[(call EFUNC(capture,running_mission))]
];
// Set up CBA event listeners
/* example usage:
["milsimServerEfficiency", [
[ // tags in hash format. must be string values!
["missionPhase", "init"]
],
[ // fields in hash format. can be any type
["value", 0.5]
["numberOfShinyObjects", 3]
]
]] call CBA_fnc_serverEvent;
*/
{
_key = _x;
_hash = createHashMapFromArray _y;
[
_hash get "eventName", // event name
{ // function
if (count _this isNotEqualTo 2) exitWith {
diag_log formatText[
"[%1] (ERROR): IFXMetrics CBA handler %2 received invalid number of arguments. Expected 2, got %3.",
GVARMAIN(logPrefix),
_thisType,
count _this
];
};
_thisArgs params [
"_enabled",
"_bucket",
"_measurement",
"_description"
];
private _data = [
["bucket", _bucket],
["measurement", _measurement],
["tags", _this#0],
["fields", _this#1]
];
GVARMAIN(extensionName) callExtension [
":INFLUX:WRITE:",
[_data]
];
},
[ // args
_key,
_hash get "enabled",
_hash get "bucket",
_hash get "measurement",
_hash get "description"
]
] call CBA_fnc_addEventHandlerArgs;
} forEach GVARMAIN(cbaHandlers);
// wait five seconds, then start the loop
call FUNC(captureLoop);

View File

@@ -0,0 +1,4 @@
#define COMPONENT main
#define COMPONENT_BEAUTIFIED Main
#include "\x\ifxmetrics\addons\main\script_mod.hpp"

View File

@@ -0,0 +1,8 @@
#include "script_version.hpp"
#define MAINPREFIX x
#define PREFIX ifxmetrics
#define PREFIX_BEAUTIFIED IFXMetrics
#define SUBPREFIX addons
#include "\x\cba\addons\main\script_macros_common.hpp"

View File

@@ -0,0 +1,8 @@
#define MAJOR 2
#define MINOR 0
#define PATCH 0
#define BUILD 20231009
#define VERSION 2.0
#define VERSION_STR MAJOR##.##MINOR##.##PATCH##.##BUILD
#define VERSION_AR MAJOR,MINOR,PATCH,BUILD

14
extension/.gitignore vendored
View File

@@ -1,14 +0,0 @@
*.pbo
*.bak
*.dll
*.so
RangerMetrics.h
RangerMetrics_x64.h
*.log
settings.json
!*.example

View File

@@ -1,15 +0,0 @@
{
"influxdb": {
"host": "http://host:8086",
"token": "",
"org": "ranger-metrics"
},
"timescaledb": {
"connectionUrl": "postgresql://postgres:password@host:5432",
"databaseName": "ranger_metrics",
"description": "TimescaleDB is an open-source time-series database built on Postgres. Please leave the final section of the connection URL as 'postgres' as this is the maintenance database name. The extension will connect here first and create the database with desired name, then shift connections to the newly created database to create the schema and conduct write operations."
},
"arma3": {
"refreshRateMs": 1000
}
}

View File

@@ -1,25 +0,0 @@
# Arma-Influx
A3 extension for sending metrics to InfluxDB using Golang
## Build
### Windows
_Requires Go 1.20.1+ & MinGW_
```powershell
$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
go build -o RangerMetrics_x64.dll -buildmode=c-shared .
```
To validate exported functions:
```powershell
. "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\dumpbin.exe" /exports .\RangerMetrics_x64.dll
```
## Notes
>
> See more: <https://github.com/code34/armago_x64>

View File

@@ -1,61 +0,0 @@
#include <stdlib.h>
#include "extensionCallback.h"
extern void goRVExtension(char *output, size_t outputSize, char *input);
extern void goRVExtensionVersion(char *output, size_t outputSize);
extern void goRVExtensionArgs(char *output, size_t outputSize, char *input, char **argv, int argc);
extern void goRVExtensionRegisterCallback(extensionCallback fnc);
#ifdef WIN64
__declspec(dllexport) void RVExtension(char *output, size_t outputSize, char *input)
{
goRVExtension(output, outputSize, input);
}
__declspec(dllexport) void RVExtensionVersion(char *output, size_t outputSize)
{
goRVExtensionVersion(output, outputSize);
}
__declspec(dllexport) void RVExtensionArgs(char *output, size_t outputSize, char *input, char **argv, int argc)
{
goRVExtensionArgs(output, outputSize, input, argv, argc);
}
__declspec(dllexport) void RVExtensionRegisterCallback(extensionCallback fnc)
{
goRVExtensionRegisterCallback(fnc);
}
#else
__declspec(dllexport) void __stdcall _RVExtension(char *output, size_t outputSize, char *input)
{
goRVExtension(output, outputSize, input);
}
__declspec(dllexport) void __stdcall _RVExtensionVersion(char *output, size_t outputSize)
{
goRVExtensionVersion(output, outputSize);
}
__declspec(dllexport) void __stdcall _RVExtensionArgs(char *output, size_t outputSize, char *input, char **argv, int argc)
{
goRVExtensionArgs(output, outputSize, input, argv, argc);
}
__declspec(dllexport) void __stdcall _RVExtensionRegisterCallback(extensionCallback fnc)
{
goRVExtensionRegisterCallback(fnc);
}
#endif
// do this for all the other exported functions
// dll entrypoint
// Path: RVExtension.c
#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
}

View File

@@ -1,585 +0,0 @@
package main
/*
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "extensionCallback.h"
*/
import "C" // This is required to import the C code
import (
"compress/gzip"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"reflect"
"strconv"
"strings"
"time"
"unsafe"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
)
// declare list of functions available for call
var AVAILABLE_FUNCTIONS = map[string]interface{}{
"initExtension": initExtension,
"deinitExtension": deinitExtension,
"loadSettings": loadSettings,
"connectToInflux": connectToInflux,
"writeToInflux": writeToInflux,
"getDir": getDir,
"sanitizeLineProtocol": sanitizeLineProtocol,
"version": version,
"getUnixTimeNano": getUnixTimeNano,
}
var EXTENSION_VERSION string = "0.0.3"
var extensionCallbackFnc C.extensionCallback
type ServerPollSetting struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
ServerOnly bool `json:"serverOnly"`
IntervalMs int `json:"intervalMs"`
Bucket string `json:"bucket"`
Measurement string `json:"measurement"`
Description string `json:"description"`
}
var ServerPollSettingProperties []string = []string{
"Name",
"Enabled",
"ServerOnly",
"IntervalMs",
"Bucket",
"Measurement",
"Description",
}
type CBAEventHandler struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
Description string `json:"description"`
}
var CBAEventHandlerProperties []string = []string{
"Name",
"Enabled",
"Description",
}
type SettingsJson struct {
Influx struct {
Enabled bool `json:"enabled"`
Host string `json:"host"`
Token string `json:"token"`
Org string `json:"org"`
} `json:"influxdb"`
Arma3 struct {
RefreshRateMs int `json:"refreshRateMs"`
Debug bool `json:"debug"`
} `json:"arma3"`
RecordingSettings map[string]ServerPollSetting `json:"recordingSettings"`
}
var activeSettings SettingsJson
// InfluxDB variables
var InfluxClient influxdb2.Client
// file paths
var ADDON_FOLDER string = getDir() + "\\@RangerMetrics"
var LOG_FILE string = ADDON_FOLDER + "\\rangermetrics.log"
var SETTINGS_FILE string = ADDON_FOLDER + "\\settings.json"
var SETTINGS_FILE_EXAMPLE string = ADDON_FOLDER + "\\settings.example.json"
var BACKUP_FILE_PATH string = ADDON_FOLDER + "\\local_backup.log.gzip"
var BACKUP_WRITER *gzip.Writer
// configure log output
func init() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
// log to file
f, err := os.OpenFile(LOG_FILE, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
// log to console as well
// log.SetOutput(io.MultiWriter(f, os.Stdout))
// log only to file
log.SetOutput(f)
}
func deinitExtension() {
functionName := "deinitExtension"
writeLog(functionName, `Deinitializing RangerMetrics extension`, "INFO")
if InfluxClient != nil {
InfluxClient.Close()
}
writeLog(functionName, `Influx connection closed.`, "INFO")
}
// func RVExtensionContext(output *C.char, argc *C.int) {
// }
func initExtension() {
deinitExtension()
// load settings
loadSettings()
var err error
// connect to Influx
InfluxClient, err = connectToInflux()
if err != nil {
writeLog("initExtension", fmt.Sprintf(`Error connecting to Influx: %s`, err), "ERROR")
} else {
writeLog("initExtension", `Influx connection established.`, "INFO")
}
writeLog("extensionReady", `RangerMetrics extension ready.`, "INFO")
// show version
version()
}
func version() {
functionName := "version"
writeLog(functionName, fmt.Sprintf(`RangerMetrics Extension Version:%s`, EXTENSION_VERSION), "INFO")
}
// return db client and error
func connectToInflux() (influxdb2.Client, error) {
loadSettings()
// create backup writer
if BACKUP_WRITER == nil {
writeLog("connectToInflux", fmt.Sprintf(`Creating backup file: %s`, BACKUP_FILE_PATH), "INFO")
// create if not exists
file, err := os.OpenFile(BACKUP_FILE_PATH, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
writeLog("connectToInflux", fmt.Sprintf(`Error opening backup file: %s`, err), "ERROR")
}
BACKUP_WRITER = gzip.NewWriter(file)
if err != nil {
writeLog("connectToInflux", fmt.Sprintf(`Error creating gzip writer: %s`, err), "ERROR")
}
}
if activeSettings.Influx.Host == "" ||
activeSettings.Influx.Host == "http://INFLUX_URL:8086" {
writeLog("connectToInflux", `Influx connection settings not configured. Using local backup`, "INFO")
writeLog("connectToInflux", fmt.Sprintf(`Influx connection settings: %v`, activeSettings), "DEBUG")
return nil, errors.New("influxConnectionSettings.Host is empty")
// writeLog("connectToInflux", `["Creating backup file", "INFO"]`)
// file, err := os.Open(BACKUP_FILE_PATH)
// if err != nil {
// log.Fatal(err)
// writeLog("connectToInflux", `["Error opening backup file", "ERROR"]`)
// }
// BACKUP_WRITER = gzip.NewWriter(file)
// if err != nil {
// log.Fatal(err)
// writeLog("connectToInflux", `["Error creating gzip writer", "ERROR"]`)
// }
// return "Error connecting to Influx. Using local backup"
}
if !activeSettings.Influx.Enabled {
return nil, errors.New("influxdb.Enabled is false")
}
InfluxClient := influxdb2.NewClientWithOptions(activeSettings.Influx.Host, activeSettings.Influx.Token, influxdb2.DefaultOptions().SetBatchSize(2500).SetFlushInterval(1000))
if InfluxClient == nil {
return nil, errors.New("InfluxClient is nil")
}
return InfluxClient, nil
}
func writeToInflux(a3DataRaw *[]string) string {
var err error
// convert to string array
a3Data := *a3DataRaw
if !activeSettings.Influx.Enabled {
return "InfluxDB is disabled"
}
if InfluxClient == nil {
InfluxClient, err = connectToInflux()
if err != nil {
InfluxClient = nil
// return fmt.Sprintf(`Error connecting to InfluxDB: %v`, err)
// we dont want to return, because we have the backup log being written as a fallback
}
}
MIN_PARAMS_COUNT := 1
var logData string
functionName := "writeToInflux"
if len(a3Data) < MIN_PARAMS_COUNT {
logData = fmt.Sprintf(`Not all parameters present (got %d, expected at least %d)`, len(a3Data), MIN_PARAMS_COUNT)
writeLog(functionName, logData, "ERROR")
return logData
}
// use custom bucket or default
var bucket string = fixEscapeQuotes(trimQuotes(string(a3Data[0])))
// Get non-blocking write client
WRITE_API := InfluxClient.WriteAPI(activeSettings.Influx.Org, bucket)
if WRITE_API == nil {
// writeLog(functionName, "Error creating write API", "ERROR")
// return logData
} else {
// Get errors channel
errorsCh := WRITE_API.Errors()
go func() {
for writeErr := range errorsCh {
writeLog(functionName, fmt.Sprintf(`Error parsing line protocol: %s`, writeErr.Error()), "ERROR")
}
}()
}
// now we have our write client, we'll go through the rest of the receive array items in line protocol format and write them to influx (should only be one line per call)
var p string = fixEscapeQuotes(trimQuotes(string(a3Data[1])))
// write the line to influx or backup
if WRITE_API != nil {
WRITE_API.WriteRecord(p)
writeLog(functionName, fmt.Sprintf(`Wrote %d lines to influx`, len(a3Data)-1), "DEBUG")
} else {
// append backup line to file if BACKUP_WRITER is set
if BACKUP_WRITER != nil {
_, err = BACKUP_WRITER.Write([]byte(p + "\n"))
if err != nil {
writeLog(functionName, fmt.Sprintf(`Error writing to backup file: %s`, err), "ERROR")
} else {
writeLog(functionName, fmt.Sprintf(`Wrote %d lines to backup file`, len(a3Data)-1), "DEBUG")
}
} else {
writeLog(functionName, `BACKUP_WRITER is nil`, "ERROR")
}
}
return "Success"
}
// sanitize line protocol for influx
func sanitizeLineProtocol(line string) string {
// replace all spaces with underscores
// line = strings.ReplaceAll(line, ` `, `\ `)
// replace all commas with underscores
// line = strings.ReplaceAll(line, `,`, `\,`)
// replace all equals with underscores
// line = strings.ReplaceAll(line, "=", "_")
// replace all quotes with underscores
// line = strings.ReplaceAll(line, "\"", "_")
return line
}
func getDir() string {
dir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
return dir
}
func loadSettings() (SettingsJson, error) {
functionName := "loadSettings"
writeLog(functionName, fmt.Sprintf(`ADDON_FOLDER: %s`, ADDON_FOLDER), "DEBUG")
writeLog(functionName, fmt.Sprintf(`LOG_FILE: %s`, LOG_FILE), "DEBUG")
writeLog(functionName, fmt.Sprintf(`SETTINGS_FILE: %s`, SETTINGS_FILE), "DEBUG")
settings := SettingsJson{}
// print the current working directory
var file *os.File
var err error
// read settings from file
// settings.json should be in the same directory as the .dll
// see if the file exists
if _, err = os.Stat(SETTINGS_FILE); os.IsNotExist(err) {
// file does not exist
writeLog(
functionName,
fmt.Sprintf(`%s does not exist`, SETTINGS_FILE),
"WARN",
)
// copy settings.json.example to settings.json
// load contents
fileContents, err := ioutil.ReadFile(SETTINGS_FILE_EXAMPLE)
if err != nil {
return settings, err
}
// write contents to settings.json
err = ioutil.WriteFile(SETTINGS_FILE, fileContents, 0644)
if err != nil {
return settings, err
}
// Exit false to discontinue initialization since settings are defaults
writeLog(functionName, `CREATED SETTINGS`, "INFO")
// return a new error
return settings, errors.New("settings.json does not exist")
} else {
// file exists
writeLog(functionName, `settings.json found`, "DEBUG")
// read the file
file, err = os.OpenFile(SETTINGS_FILE, os.O_RDONLY, 0644)
if err != nil {
return settings, err
}
defer file.Close()
decoder := json.NewDecoder(file)
err = decoder.Decode(&settings)
if err != nil {
return settings, err
}
// send contents of settings file
// get the file contents
fileContents, err := ioutil.ReadFile(SETTINGS_FILE)
if err != nil {
return settings, err
}
// unmarshal the json to activeSettings
err = json.Unmarshal(fileContents, &activeSettings)
if err != nil {
writeLog(functionName, fmt.Sprintf(`Error unmarshalling settings json: %s`, err), "ERROR")
return settings, err
}
// marshal the json
var jsonStr []byte
jsonStr, err = json.Marshal(activeSettings)
if err != nil {
writeLog(functionName, fmt.Sprintf(`Error marshalling settings json: %s`, err), "ERROR")
return activeSettings, err
}
// convert to string
var jsonStrString string = string(jsonStr)
// send the contents to the log
writeLog(
"loadSettingsJSON",
jsonStrString,
"DEBUG",
)
}
return settings, nil
}
func runExtensionCallback(name *C.char, function *C.char, data *C.char) C.int {
return C.runExtensionCallback(extensionCallbackFnc, name, function, data)
}
//export goRVExtensionVersion
func goRVExtensionVersion(output *C.char, outputsize C.size_t) {
result := C.CString(EXTENSION_VERSION)
defer C.free(unsafe.Pointer(result))
var size = C.strlen(result) + 1
if size > outputsize {
size = outputsize
}
C.memmove(unsafe.Pointer(output), unsafe.Pointer(result), size)
}
//export goRVExtensionArgs
func goRVExtensionArgs(output *C.char, outputsize C.size_t, input *C.char, argv **C.char, argc C.int) {
var offset = unsafe.Sizeof(uintptr(0))
var out []string
for index := C.int(0); index < argc; index++ {
out = append(out, C.GoString(*argv))
argv = (**C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(argv)) + offset))
}
var temp string
temp = fmt.Sprintf("Function: %s nb params: %d params: %s!", C.GoString(input), argc, out)
if C.GoString(input) == "sendToInflux" {
// start a goroutine to send the data to influx
// param string is argv[0] which is the data to send to influx
go writeToInflux(&out)
// temp = fmt.Sprintf("Function: %s nb params: %d", C.GoString(input), argc)
temp = "WRITE"
}
// Return a result to Arma
result := C.CString(temp)
defer C.free(unsafe.Pointer(result))
var size = C.strlen(result) + 1
if size > outputsize {
size = outputsize
}
C.memmove(unsafe.Pointer(output), unsafe.Pointer(result), size)
}
func callBackExample() {
name := C.CString("arma")
defer C.free(unsafe.Pointer(name))
function := C.CString("funcToExecute")
defer C.free(unsafe.Pointer(function))
// Make a callback to Arma
for i := 0; i < 3; i++ {
time.Sleep(2 * time.Second)
param := C.CString(fmt.Sprintf("Loop: %d", i))
defer C.free(unsafe.Pointer(param))
runExtensionCallback(name, function, param)
}
}
func getUnixTimeNano() int64 {
// get the current unix timestamp in nanoseconds
return time.Now().UnixNano()
}
func trimQuotes(s string) string {
// trim the start and end quotes from a string
return strings.Trim(s, `"`)
}
func fixEscapeQuotes(s string) string {
// fix the escape quotes in a string
return strings.Replace(s, `""`, `"`, -1)
}
func writeLog(functionName string, data string, level string) {
if activeSettings.Arma3.Debug && level == "DEBUG" {
} else if level != "DEBUG" {
log.Println(data)
}
if extensionCallbackFnc != nil {
// replace double quotes with 2 double quotes
escapedData := strings.Replace(data, `"`, `""`, -1)
// do the same for single quotes
escapedData = strings.Replace(escapedData, `'`, `''`, -1)
a3Message := fmt.Sprintf(`["%s", "%s"]`, escapedData, level)
statusName := C.CString("RangerMetrics")
defer C.free(unsafe.Pointer(statusName))
statusFunction := C.CString(functionName)
defer C.free(unsafe.Pointer(statusFunction))
statusParam := C.CString(a3Message)
defer C.free(unsafe.Pointer(statusParam))
runExtensionCallback(statusName, statusFunction, statusParam)
}
}
//export goRVExtension
func goRVExtension(output *C.char, outputsize C.size_t, input *C.char) {
var temp string
// writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "DEBUG"]`, C.GoString(input)), true)
switch C.GoString(input) {
case "version":
temp = EXTENSION_VERSION
case "getDir":
temp = getDir()
case "getUnixTimeNano":
time := getUnixTimeNano()
temp = fmt.Sprintf(`["%s"]`, strconv.FormatInt(time, 10))
default:
// check if input is in AVAILABLE_FUNCTIONS
// if not, return error
// if yes, continue
if _, ok := AVAILABLE_FUNCTIONS[C.GoString(input)]; !ok {
temp = fmt.Sprintf(`["Function: %s not found!", "ERROR"]`, C.GoString(input))
} else {
// call the function by name
go reflect.ValueOf(AVAILABLE_FUNCTIONS[C.GoString(input)]).Call([]reflect.Value{})
temp = fmt.Sprintf(`["Function: %s called successfully", "DEBUG"]`, C.GoString(input))
}
}
// switch C.GoString(input) {
// case "version":
// writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// temp = EXTENSION_VERSION
// case "getDir":
// writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// temp = getDir()
// case "loadSettings":
// writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// cwd, result, influxHost, timescaleUrl := loadSettings()
// log.Println("CWD:", cwd)
// log.Println("RESULT:", result)
// log.Println("INFLUX HOST:", influxHost)
// log.Println("TIMESCALE URL:", timescaleUrl)
// if result != "" {
// writeLog("goRVExtension", result)
// temp = fmt.Sprintf(
// `["%s", "%s", "%s", "%d"]`,
// EXTENSION_VERSION,
// influxConnectionSettings.Host,
// influxConnectionSettings.Org,
// a3Settings.RefreshRateMs,
// )
// }
// case "connectToInflux":
// // writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// go connectToInflux()
// temp = `["Connecting to InfluxDB", "INFO"]`
// case "connectToTimescale":
// // writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// go connectToTimescale()
// temp = `["Connecting to TimescaleDB", "INFO"]`
// case "getUnixTimeNano":
// temp = fmt.Sprintf(`["%d", "INFO"]`, getUnixTimeNano())
// case "deinitialize":
// writeLog("goRVExtension", fmt.Sprintf(`["Input: %s", "INFO"]`, C.GoString(input)))
// deinitialize()
// temp = `["Deinitializing", "INFO"]`
// default:
// temp = fmt.Sprintf(`["Unknown command: %s", "ERROR"]`, C.GoString(input))
// }
result := C.CString(temp)
defer C.free(unsafe.Pointer(result))
var size = C.strlen(result) + 1
if size > outputsize {
size = outputsize
}
C.memmove(unsafe.Pointer(output), unsafe.Pointer(result), size)
// return
}
//export goRVExtensionRegisterCallback
func goRVExtensionRegisterCallback(fnc C.extensionCallback) {
extensionCallbackFnc = fnc
}
func main() {}

View File

@@ -1,5 +0,0 @@
$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
go1.16.4 build -o RangerMetrics_x64.dll -buildmode=c-shared .
go1.16.4 build -o ../@RangerMetrics/RangerMetrics_x64.dll -buildmode=c-shared .

319
extension/cmd/main.go Normal file
View File

@@ -0,0 +1,319 @@
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strings"
"time"
"github.com/indig0fox/IFXMetrics/internal/influx"
"github.com/indig0fox/IFXMetrics/internal/logger"
"github.com/indig0fox/IFXMetrics/internal/settings"
"github.com/indig0fox/a3go/a3interface"
"github.com/indig0fox/a3go/assemblyfinder"
)
var EXTENSION_VERSION string = "DEVELOPMENT"
// file paths
var EXTENSION_PATH string = assemblyfinder.GetModulePath()
var ADDON_FOLDER string = filepath.Dir(EXTENSION_PATH)
var LOG_FILE string = ADDON_FOLDER + "\\ifxmetrics.log"
var SETTINGS_FILE string = ADDON_FOLDER + "\\ifxmetrics.config.json"
var extensionReady bool = false
// configure log output
func init() {
var err error
// load settings
err = settings.Setup(ADDON_FOLDER)
if err != nil {
log.Fatal(err)
}
if settings.Active == nil {
log.Fatal("settings.Active is nil")
}
// init logger
logger.InitLoggers(&logger.LoggerOptionsType{
Path: LOG_FILE,
AddonName: "IFXMetrics",
ExtensionName: "IFXMetrics",
ExtensionVersion: EXTENSION_VERSION,
Debug: settings.Active.GetBool("arma3.debug"),
Trace: settings.Active.GetBool("arma3.traceLogToFile"),
})
logger.Log.Info().Msgf(
`IFXMetrics extension started. Version: %s`,
EXTENSION_VERSION,
)
a3interface.NewRegistration(":START:").
SetFunction(func(
ctx a3interface.ArmaExtensionContext,
data string,
) (string, error) {
if extensionReady {
// reload config
settings.Active.ReadInConfig()
logger.Log.Info().Msg("Reloaded config")
}
extensionReady = true
return fmt.Sprintf(
`["IFXMetrics ready (v%s)"]`,
EXTENSION_VERSION,
), nil
}).
SetRunInBackground(false).
Register()
a3interface.NewRegistration(":SETTINGS:").
SetFunction(onSettingsCommand).
SetRunInBackground(false).
Register()
a3interface.NewRegistration(":CUSTOM:CBA:EVENTS:").
SetFunction(onCustomCBAEventsCommand).
SetRunInBackground(false).
Register()
a3interface.NewRegistration(":INFLUX:CONNECT:").
SetFunction(onInfluxConnect).
SetRunInBackground(false).
Register()
a3interface.NewRegistration(":INFLUX:WRITE:").
SetArgsFunction(onInfluxWrite).
SetRunInBackground(false).
Register()
}
func onSettingsCommand(
ctx a3interface.ArmaExtensionContext,
data string,
) (string, error) {
return fmt.Sprintf(
`[%t, %t, %d]`,
settings.Active.GetBool("influxdb.enabled"),
settings.Active.GetBool("arma3.debug"),
settings.Active.GetInt("arma3.refreshRateMs"),
), nil
}
func onCustomCBAEventsCommand(
ctx a3interface.ArmaExtensionContext,
data string,
) (string, error) {
s := settings.Active.Get("cbaEventHandlers")
// return the custom cba event handlers as an arma hashmap
se := a3interface.ToArmaHashMap(s)
return fmt.Sprintf(
`%s`,
se,
), nil
}
func onInfluxConnect(
ctx a3interface.ArmaExtensionContext,
data string,
) (string, error) {
err := influx.Setup(
settings.Active,
)
if err != nil {
logger.Log.Error().Msg(err.Error())
return "", err
}
logger.Log.Info().Msgf(
"Connected to InfluxDB at %s",
settings.Active.GetString("influxdb.host"),
)
return fmt.Sprintf(
`["OK", "Connected to InfluxDB at %s"]`,
settings.Active.GetString("influxdb.host"),
), nil
}
func onInfluxWrite(
ctx a3interface.ArmaExtensionContext,
command string,
args []string,
) (string, error) {
var err error
commandTrace := logger.FileOnly.With().
Str("command", command).
Str("file_source", ctx.FileSource).
Logger()
commandTrace.Trace().Msgf(
"onInfluxWrite: %s",
strings.Join(args, ", "),
)
argsProcessed := []map[string]interface{}{}
for _, arg := range args {
thisArgJSON, err := a3interface.ParseSQF(arg)
if err != nil {
logger.Log.Error().
Str("command", command).
Str("arg", arg).
Msg(err.Error())
continue
}
thisArgHash, err := a3interface.ParseSQFHashMap(thisArgJSON)
if err != nil {
logger.Log.Error().
Str("command", command).
Str("arg", arg).
Msg(err.Error())
continue
}
argsProcessed = append(argsProcessed, thisArgHash)
}
commandTrace.Trace().Msgf(
"argsProcessed: %v",
argsProcessed,
)
for _, hash := range argsProcessed {
hashLog := commandTrace.With().
Str("bucket", fmt.Sprintf("%v", hash["bucket"])).
Str("measurement", fmt.Sprintf("%v", hash["measurement"])).
Logger()
// bucket
if hash["bucket"] == nil {
hashLog.Error().Msg("bucket not declared")
continue
}
// determine type of bucket
hashLog.Trace().Msgf(
"hash[\"bucket\"] is type %T",
hash["bucket"],
)
var bucket string = hash["bucket"].(string)
if bucket == "" {
hashLog.Error().Msg("bucket not declared")
continue
}
// measurement
if hash["measurement"] == nil {
hashLog.Error().Msg("measurement not declared")
continue
}
// determine type of measurement
hashLog.Trace().Msgf(
"hash[\"measurement\"] is type %T",
hash["measurement"],
)
var measurement string = hash["measurement"].(string)
if measurement == "" {
hashLog.Error().Msg("measurement not declared")
continue
}
// tags
// write type
hashLog.Trace().Msgf(
"hash[\"tags\"] is type %T",
hash["tags"],
)
var tags = map[string]string{}
if hash["tags"] == nil {
tags = map[string]string{}
} else {
// convert the tags to a map[string]string type by transferring values
for k, v := range hash["tags"].(map[string]interface{}) {
tags[k] = fmt.Sprintf("%v", v)
}
}
// fields
// write type
hashLog.Trace().Msgf(
"hash[\"fields\"] is type %T",
hash["fields"],
)
var fields map[string]interface{}
if hash["fields"] == nil {
fields = map[string]interface{}{}
} else {
fields = hash["fields"].(map[string]interface{})
}
// write the line to influx
hashLog.Trace().Msg("Writing line to influx")
err = influx.WriteLine(
bucket,
measurement,
tags,
fields,
)
if err != nil {
hashLog.Error().Msg(err.Error())
continue
}
}
return fmt.Sprintf(
"Wrote %d lines to InfluxDB buffer",
len(argsProcessed),
), nil
}
func getDir() string {
dir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
return dir
}
func getUnixTimeNano() int64 {
// get the current unix timestamp in nanoseconds
return time.Now().UnixNano()
}
func trimQuotes(s string) string {
// trim the start and end quotes from a string
return strings.Trim(s, `"`)
}
func fixEscapeQuotes(s string) string {
// fix the escape quotes in a string
return strings.Replace(s, `""`, `"`, -1)
}
func main() {
// // Example usage
// data := map[string]interface{}{
// "name": "John \"Doe\"",
// "info": map[string]interface{}{
// "address": "123 \"Main\" St",
// },
// "numbers": []interface{}{1, 2, 3.14, "four", true},
// }
// result := a3interface.ToArmaHashMap(data)
// fmt.Println(result)
// s := settings.Active.Get("cbaEventHandlers")
// // return the custom cba event handlers as an arma hashmap
// fmt.Println(a3interface.ToArmaHashMap(s))
}

View File

@@ -1,11 +0,0 @@
#pragma once
#include <stdlib.h>
typedef int (*extensionCallback)(char const *name, char const *function, char const *data);
/* https://golang.org/cmd/cgo/#hdr-C_references_to_Go */
static inline int runExtensionCallback(extensionCallback fnc, char const *name, char const *function, char const *data)
{
return fnc(name, function, data);
}

View File

@@ -1,5 +1,97 @@
module main module github.com/indig0fox/IFXMetrics
go 1.16 go 1.20
require github.com/influxdata/influxdb-client-go/v2 v2.6.0 require (
github.com/indig0fox/a3go v0.3.2
github.com/influxdata/influxdb-client-go/v2 v2.12.3
github.com/kataras/iris/v12 v12.2.7
github.com/rs/zerolog v1.31.0
github.com/spf13/viper v1.17.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)
require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
github.com/Joker/jade v1.1.3 // indirect
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bytedance/sonic v1.10.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/deepmap/oapi-codegen v1.15.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.15.5 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kataras/blocks v0.0.8 // indirect
github.com/kataras/golog v0.1.9 // indirect
github.com/kataras/pio v0.0.12 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/labstack/echo/v4 v4.11.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailgun/raymond/v2 v2.0.48 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tdewolff/minify/v2 v2.12.9 // indirect
github.com/tdewolff/parse/v2 v2.6.8 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yosssi/ace v0.0.5 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@@ -1,84 +1,699 @@
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c=
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME=
github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4=
github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk=
github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0=
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM=
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE=
github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deepmap/oapi-codegen v1.8.2 h1:SegyeYGcdi0jLLrpbCMoJxnUUn8GBXHsvr4rbzjuhfU= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/influxdata/influxdb-client-go/v2 v2.6.0 h1:bIOaGTgvvv1Na2hG+nIvqyv7PK2UiU2WrJN1ck1ykyM= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/influxdata/influxdb-client-go/v2 v2.6.0/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24=
github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386 h1:EcQR3gusLHN46TAD+G+EbaaqJArt5vHhNpXAa12PQf4=
github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
github.com/indig0fox/a3go v0.3.2 h1:bNL90pffeOnS6Qtjoo5JHpdpZn1f0BZmRZR8nz/xcvQ=
github.com/indig0fox/a3go v0.3.2/go.mod h1:8htVwBiIAVKpT1Jyb+5dm7GuLAAevTXgw7UKxSlOawY=
github.com/influxdata/influxdb-client-go/v2 v2.12.3 h1:28nRlNMRIV4QbtIUvxhWqaxn0IpXeMSkY/uJa/O/vC4=
github.com/influxdata/influxdb-client-go/v2 v2.12.3/go.mod h1:IrrLUbCjjfkmRuaCiGQg4m2GbkaeJDcuWoxiWdQEbA0=
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf h1:7JTmneyiNEwVBOHSjoMxiWAqB992atOeepeFYegn5RU=
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go=
github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw=
github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
github.com/kataras/blocks v0.0.8 h1:MrpVhoFTCR2v1iOOfGng5VJSILKeZZI+7NGfxEh3SUM=
github.com/kataras/blocks v0.0.8/go.mod h1:9Jm5zx6BB+06NwA+OhTbHW1xkMOYxahnqTN5DveZ2Yg=
github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk=
github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY=
github.com/kataras/iris/v12 v12.2.7 h1:C9KWZmZT5pB5f2ot1XYWDBdi5XeTz0CGweHRXCDARZg=
github.com/kataras/iris/v12 v12.2.7/go.mod h1:mD76k/tIBFy8pHTFIgUPrVrkI4lTKvFbIcfbStJSBnA=
github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w=
github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY=
github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY=
github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4=
github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA=
github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg=
github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ=
github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo=
github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk=
github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA=
github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU=
github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA=
github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM=
github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0=
github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/vmihailenco/msgpack/v5 v5.4.0 h1:hRM0digJwyR6vll33NNAwCFguy5JuBD6jxDmQP3l608=
github.com/vmihailenco/msgpack/v5 v5.4.0/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=
github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA=
github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0=
github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y=
golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

View File

@@ -0,0 +1,123 @@
package influx
import (
"context"
"time"
"github.com/indig0fox/IFXMetrics/internal/logger"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
"github.com/influxdata/influxdb-client-go/v2/api"
"github.com/influxdata/influxdb-client-go/v2/domain"
"github.com/kataras/iris/v12/x/errors"
"github.com/spf13/viper"
)
var InfluxClient influxdb2.Client
var Connected bool = false
var activeSettings *viper.Viper
var writeAPIs = map[string]api.WriteAPI{}
var writeAPIErrorChannels = map[string]<-chan error{}
func Setup(
settings *viper.Viper,
) error {
activeSettings = settings
// create influx client
InfluxClient = influxdb2.NewClientWithOptions(
activeSettings.GetString("influxdb.host"),
activeSettings.GetString("influxdb.token"),
influxdb2.DefaultOptions().SetFlushInterval(1000),
)
_, err := InfluxClient.Ping(context.Background())
if err != nil {
return err
}
Connected = true
// start error handler
go func() {
for {
for bucket, err := range writeAPIErrorChannels {
thisLog := logger.FileOnly.With().
Str("component", "influx").
Str("bucket", bucket).
Logger()
select {
case e := <-err:
thisLog.Error().Msg(e.Error())
default:
continue
}
}
time.Sleep(1 * time.Second)
}
}()
return nil
}
func WriteLine(
bucket string,
measurement string,
tags map[string]string,
fields map[string]interface{},
) error {
if !Connected {
return errors.New("influxdb not connected")
}
if InfluxClient == nil {
return errors.New("influxdb client not initialized")
}
// check if bucket exists
b := InfluxClient.BucketsAPI()
_, err := b.FindBucketByName(context.Background(), bucket)
if err != nil {
// get organization
org, err := InfluxClient.OrganizationsAPI().FindOrganizationByName(
context.Background(),
activeSettings.GetString("influxdb.org"),
)
if err != nil {
return err
}
// create bucket
bucket, err := b.CreateBucketWithName(
context.Background(),
org,
bucket,
domain.RetentionRule{EverySeconds: 0},
)
if err != nil {
return err
}
logger.Log.Info().Msgf("created bucket %s", bucket.Name)
return err
}
if writeAPIs[bucket] == nil {
writeAPIs[bucket] = InfluxClient.WriteAPI(
activeSettings.GetString("influxdb.org"),
bucket,
)
writeAPIErrorChannels[bucket] = writeAPIs[bucket].Errors()
}
p := influxdb2.NewPoint(
measurement,
tags,
fields,
time.Now(),
)
writeAPIs[bucket].WritePoint(p)
return nil
}

View File

@@ -0,0 +1,129 @@
package logger
import (
"fmt"
"strings"
"time"
"github.com/indig0fox/a3go/a3interface"
"github.com/rs/zerolog"
"gopkg.in/natefinch/lumberjack.v2"
)
var ll *lumberjack.Logger
var armaWriter *armaIoWriter
var Log, FileOnly, ArmaOnly zerolog.Logger
var ActiveOptions *LoggerOptionsType = &LoggerOptionsType{}
type LoggerOptionsType struct {
// LogPath is the path to the log file
Path string
// LogAddonName is the name of the addon that will be used to send log messages to arma
AddonName string
// LogExtensionName is the name of the extension that will be used to send log messages to arma
ExtensionName string
// ExtensionVersion is the version of this extension
ExtensionVersion string
// LogDebug determines if we should send Debug level messages to file & arma
Debug bool
// LogTrace is used to determine if file should receive trace level, regardless of debug
Trace bool
}
func RotateLogs() {
ll.Rotate()
}
// ArmaIoWriter is a custom type that implements the io.Writer interface and sends the output to Arma with the "log" callback
type armaIoWriter struct{}
func (w *armaIoWriter) Write(p []byte) (n int, err error) {
// write to arma log
a3interface.WriteArmaCallback(ActiveOptions.ExtensionName, ":LOG:", string(p))
return len(p), nil
}
// console writer
func InitLoggers(o *LoggerOptionsType) {
ActiveOptions = o
// create a new lumberjack file logger (adds log rotation and compression)
ll = &lumberjack.Logger{
Filename: ActiveOptions.Path,
MaxSize: 5,
MaxBackups: 10,
MaxAge: 14,
Compress: false,
LocalTime: true,
}
// create a new io writer using the a3go callback function
// this will be used to write to the arma log
armaWriter = new(armaIoWriter)
// create format functions for RPT log messages
armaLogFormatLevel := func(i interface{}) string {
return strings.ToUpper(
fmt.Sprintf(
"%s:",
i,
))
}
armaLogFormatTimestamp := func(i interface{}) string {
return ""
}
FileOnly = zerolog.New(zerolog.ConsoleWriter{
Out: ll,
TimeFormat: time.RFC3339,
NoColor: true,
}).With().Timestamp().Caller().Logger()
if ActiveOptions.Trace {
FileOnly = FileOnly.Level(zerolog.TraceLevel)
} else if ActiveOptions.Debug {
FileOnly = FileOnly.Level(zerolog.DebugLevel)
} else {
FileOnly = FileOnly.Level(zerolog.InfoLevel)
}
ArmaOnly = zerolog.New(zerolog.ConsoleWriter{
Out: armaWriter,
TimeFormat: "",
NoColor: true,
FormatLevel: armaLogFormatLevel,
FormatTimestamp: armaLogFormatTimestamp,
}).With().Str("extension_version", ActiveOptions.ExtensionVersion).Logger()
if ActiveOptions.Debug {
ArmaOnly = ArmaOnly.Level(zerolog.DebugLevel)
} else {
ArmaOnly = ArmaOnly.Level(zerolog.InfoLevel)
}
// create something that can send the same message to both loggers
// this is used to send messages to the arma log
// and the file log
Log = zerolog.New(zerolog.MultiLevelWriter(
zerolog.ConsoleWriter{
Out: ll,
TimeFormat: time.RFC3339,
NoColor: true,
},
zerolog.ConsoleWriter{
Out: armaWriter,
TimeFormat: "",
NoColor: true,
FormatTimestamp: armaLogFormatTimestamp,
FormatLevel: armaLogFormatLevel,
},
)).With().Timestamp().Logger()
if ActiveOptions.Debug {
Log = Log.Level(zerolog.DebugLevel)
} else {
Log = Log.Level(zerolog.InfoLevel)
}
}

View File

@@ -0,0 +1,80 @@
package settings
import (
"os"
"github.com/indig0fox/a3go/a3interface"
"github.com/spf13/viper"
)
type CBAEventHandlerSetting struct {
Name string `json:"name"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Bucket string `json:"bucket"`
Measurement string `json:"measurement"`
}
var Active *viper.Viper
func init() {
Active = viper.New()
}
func Setup(
addonFolder string,
) error {
Active.SetConfigName("ifxmetrics.config")
Active.SetConfigType("json")
Active.AddConfigPath(addonFolder)
armaDir, err := os.Getwd()
if err != nil {
return err
}
Active.AddConfigPath(armaDir)
Active.SetDefault("influxdb", map[string]interface{}{
"enabled": false,
"host": "http://localhost:8086",
"token": "",
"org": "",
})
Active.SetDefault("arma3", map[string]interface{}{
"refreshRateMs": 2000,
"debug": "true",
})
Active.SetDefault("cbaEventHandlers", []map[string]interface{}{})
if err := Active.ReadInConfig(); err != nil {
if _, ok := err.(viper.ConfigFileNotFoundError); ok {
// Config file not found; ignore error if desired
a3interface.WriteArmaCallback(
"ifxmetrics",
":LOG:",
"WARN",
"Config file not found; using default values.",
)
return nil
} else {
// Config file was found but another error was produced
a3interface.WriteArmaCallback(
"ifxmetrics",
":LOG:",
"ERROR",
err.Error(),
)
return err
}
} else {
a3interface.WriteArmaCallback(
"ifxmetrics",
":LOG:",
"INFO",
"Config file found; using values from config file.",
)
}
return nil
}

View File

@@ -1,26 +0,0 @@
freeExtension "RangerMetrics";
// sleep 0.5;
// "RangerMetrics" callExtension "loadSettings";
// "RangerMetrics" callExtension "version";
// "RangerMetrics" callExtension "connectToInflux";
// "RangerMetrics" callExtension "connectToTimescale";
// sleep 5;
// "RangerMetrics" callExtension "initTimescale";
// addMissionEventHandler ["ExtensionCallback", {
// params ["_extension", "_function", "_data"];
// if (
// _extension == "RangerMetrics" && _function isEqualTo "connectToTimescale"
// ) then {
// diag_log format ["RangerMetrics: %1", _data];
// };
// }];
"RangerMetrics" callExtension "deinitExtension";
sleep 1;
"RangerMetrics" callExtension "initExtension";
sleep 20;
"RangerMetrics" callExtension "deinitExtension";
// freeExtension "RangerMetrics";
sleep 5;
exit;

3
go.work Normal file
View File

@@ -0,0 +1,3 @@
go 1.20
use ./extension

16
go.work.sum Normal file
View File

@@ -0,0 +1,16 @@
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=

View File

@@ -0,0 +1,22 @@
{
"influxdb": {
"enabled": true,
"host": "http://INFLUX_URL:8086",
"token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX_AUTH_TOKEN_XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"org": "ORG_NAME"
},
"arma3": {
"refreshRateMs": 2000,
"debug": false,
"traceLogToFile": false
},
"cbaEventHandlers": {
"milsimServerEfficiency": {
"eventName": "milsimServerEfficiency",
"description": "EVENTHANDLER. Tracks the efficiency of the server.",
"enabled": true,
"bucket": "server_performance",
"measurement": "milsim_server_efficiency"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,118 @@
/*
Header: script_xeh.hpp
Description:
Used internally.
*/
/////////////////////////////////////////////////////////////////////////////////
// MACRO: EXTENDED_EVENTHANDLERS
// Add all XEH event handlers
/////////////////////////////////////////////////////////////////////////////////
#define EXTENDED_EVENTHANDLERS init = "call cba_xeh_fnc_init"; \
fired = "call cba_xeh_fnc_fired"; \
animChanged = "call cba_xeh_fnc_animChanged"; \
animDone = "call cba_xeh_fnc_animDone"; \
animStateChanged = "call cba_xeh_fnc_animStateChanged"; \
containerClosed = "call cba_xeh_fnc_containerClosed"; \
containerOpened = "call cba_xeh_fnc_containerOpened"; \
controlsShifted = "call cba_xeh_fnc_controlsShifted"; \
dammaged = "call cba_xeh_fnc_dammaged"; \
engine = "call cba_xeh_fnc_engine"; \
epeContact = "call cba_xeh_fnc_epeContact"; \
epeContactEnd = "call cba_xeh_fnc_epeContactEnd"; \
epeContactStart = "call cba_xeh_fnc_epeContactStart"; \
explosion = "call cba_xeh_fnc_explosion"; \
firedNear = "call cba_xeh_fnc_firedNear"; \
fuel = "call cba_xeh_fnc_cba_xeh_fuel"; \
gear = "call cba_xeh_fnc_gear"; \
getIn = "call cba_xeh_fnc_getIn"; \
getInMan = "call cba_xeh_fnc_getInMan"; \
getOut = "call cba_xeh_fnc_getOut"; \
getOutMan = "call cba_xeh_fnc_getOutMan"; \
handleHeal = "call cba_xeh_fnc_handleHeal"; \
hit = "call cba_xeh_fnc_hit"; \
hitPart = "call cba_xeh_fnc_hitPart"; \
incomingMissile = "call cba_xeh_fnc_incomingMissile"; \
inventoryClosed = "call cba_xeh_fnc_inventoryClosed"; \
inventoryOpened = "call cba_xeh_fnc_inventoryOpened"; \
killed = "call cba_xeh_fnc_killed"; \
landedTouchDown = "call cba_xeh_fnc_landedTouchDown"; \
landedStopped = "call cba_xeh_fnc_landedStopped"; \
local = "call cba_xeh_fnc_local"; \
respawn = "call cba_xeh_fnc_respawn"; \
put = "call cba_xeh_fnc_put"; \
take = "call cba_xeh_fnc_take"; \
seatSwitched = "call cba_xeh_fnc_seatSwitched"; \
seatSwitchedMan = "call cba_xeh_fnc_seatSwitchedMan"; \
soundPlayed = "call cba_xeh_fnc_soundPlayed"; \
weaponAssembled = "call cba_xeh_fnc_weaponAssembled"; \
weaponDisassembled = "call cba_xeh_fnc_weaponDisassembled"; \
weaponDeployed = "call cba_xeh_fnc_weaponDeployed"; \
weaponRested = "call cba_xeh_fnc_weaponRested"; \
reloaded = "call cba_xeh_fnc_reloaded"; \
firedMan = "call cba_xeh_fnc_firedMan"; \
turnIn = "call cba_xeh_fnc_turnIn"; \
turnOut = "call cba_xeh_fnc_turnOut"; \
deleted = "call cba_xeh_fnc_deleted"; \
disassembled = "call cba_xeh_fnc_disassembled"; \
Suppressed = "call cba_xeh_fnc_Suppressed"; \
gestureChanged = "call cba_xeh_fnc_gestureChanged"; \
gestureDone = "call cba_xeh_fnc_gestureDone";
/*
MACRO: DELETE_EVENTHANDLERS
Removes all event handlers.
*/
#define DELETE_EVENTHANDLERS init = ""; \
fired = ""; \
animChanged = ""; \
animDone = ""; \
animStateChanged = ""; \
containerClosed = ""; \
containerOpened = ""; \
controlsShifted = ""; \
dammaged = ""; \
engine = ""; \
epeContact = ""; \
epeContactEnd = ""; \
epeContactStart = ""; \
explosion = ""; \
firedNear = ""; \
fuel = ""; \
gear = ""; \
getIn = ""; \
getInMan = ""; \
getOut = ""; \
getOutMan = ""; \
handleHeal = ""; \
hit = ""; \
hitPart = ""; \
incomingMissile = ""; \
inventoryClosed = ""; \
inventoryOpened = ""; \
killed = ""; \
landedTouchDown = ""; \
landedStopped = ""; \
local = ""; \
respawn = ""; \
put = ""; \
take = ""; \
seatSwitched = ""; \
seatSwitchedMan = ""; \
soundPlayed = ""; \
weaponAssembled = ""; \
weaponDisassembled = ""; \
weaponDeployed = ""; \
weaponRested = ""; \
reloaded = ""; \
firedMan = ""; \
turnIn = ""; \
turnOut = ""; \
deleted = ""; \
disassembled = ""; \
Suppressed = ""; \
gestureChanged = ""; \
gestureDone = ""

View File

@@ -1,4 +1,4 @@
name = "RangerMetrics"; name = "IFXMetrics";
picture = ""; picture = "";
logoSmall = ""; logoSmall = "";
logo = ""; logo = "";
@@ -12,7 +12,7 @@ dlcColor[] =
1, 1,
1 1
}; };
overview = "Metrics for 17th Ranger Batallion"; overview = "InfluxDB logging utility for Arma 3 server metrics.";
description = "Version 1.1.0"; description = "";
hideName = 1; hideName = 0;
hidePicture = 1; hidePicture = 1;