Skip to content
This repository was archived by the owner on Aug 17, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
openvpn_exporter
.idea
dist
/.*

!/.github

!/.vscode
/.vscode/*
!/.vscode/launch.json
!/.vscode/tasks.json

!/.gitignore
!/.dockerignore
!/.gitlab-ci.yml
!/.travis.yml
68 changes: 68 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch file",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${fileDirname}",
"env":{
"GOPATH": "${workspaceFolder}/.go",
"GOCACHE": "${workspaceFolder}/.go/.cache/go-build",
},
"args": [
"web.listen-address=:9176",
"web.telemetry-path=/metrics",
"openvpn.status_paths/examples/client.status,examples/server2.status,examples/server3.status",
"ignore.individuals=false"
],
"output": "${workspaceFolder}/.go/bin/debug",
"showLog": true,
"trace": "error",
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 1048576,
"maxArrayValues": 1024,
"maxStructFields": -1
},
},
{
// See: https://github.com/Microsot/vscode-go/wiki/Debugging-Go-code-using-VS-Code
"name": "Launch test package",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/exporters",
"env":{
"GOPATH": "${workspaceFolder}/.go",
"GOCACHE": "${workspaceFolder}/.go/.cache/go-build",
},
"output": "${workspaceFolder}/.go/bin/debug.test",
"showLog": true,
"trace": "error",
},
{
"name": "Launch test function",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/exporters",
"env":{
"GOPATH": "${workspaceFolder}/.go",
"GOCACHE": "${workspaceFolder}/.go/.cache/go-build",
},
"args": [
"-test.run",
"TestNewOpenVPNExporter"
],
"output": "${workspaceFolder}/.go/bin/debug.test",
"showLog": true,
"trace": "error",
},
]
}
46 changes: 46 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "makefile-build",
"type": "shell",
"command": "make build",
"group": {
"kind": "build",
"isDefault": true,
},
},
{
"label": "makefile-up",
"type": "shell",
"command": "make up",
},
{
"label": "makefile-down",
"type": "shell",
"command": "make down",
},
{
"label": "makefile-clean",
"type": "shell",
"command": "make clean",
},
{
"label": "makefile-mount-ramdisk",
"type": "shell",
"command": "make mount-ramdisk"
},
{
"label": "makefile-unmount-ramdisk",
"type": "shell",
"command": "make unmount-ramdisk"
},
{
"label": "makefile-shell",
"type": "shell",
"command": "make shell",
},
]
}
Loading