You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c6677b8
Browse filesBrowse the repository at this point in the historyBrowse files
[](https://github.com/avelino/awesome-go#utilities)
8
8
9
-
GO actuator configures the set of actuator endpoints for your application. It is compatible with [Fast HTTP](https://github.com/valyala/fasthttp), [GIN](https://github.com/gin-gonic/gin) and [NET/HTTP](https://pkg.go.dev/net/http).
9
+
GO actuator configures the set of actuator endpoints for your application. It is very extensible and can be configured with `Go's native HTTP Server Mux`, or with any `3rd party web framework` as well.
10
10
11
11
## Project Versioning
12
12
13
13
Go actuator uses [semantic versioning](http://semver.org/). API should not change between patch and minor releases. New minor versions may add additional features to the API.
14
14
15
15
## Installation
16
16
17
-
To install Gin package, you need to install Go and set your Go workspace first.
17
+
To install `Go Actuator` package, you need to install Go and set your Go workspace first.
18
18
19
19
1. The first need Go installed (version 1.13+ is required), then you can use the below Go command to install Go Actuator.
The actuator library is compatible with the most famous web frameworks. This is highly configurable and each endpoint can be enabled or disabled during initialization. You can also specify a prefix path for each of these configured endpoints(with default value `/actuator`).
33
+
The actuator library exposes a plain native handler function, and it is the responsibility of the application to put this handler to use. This can be used either directly with `Go's native HTTP Server Mux`, or with any `3rd party web framework` as well.
34
34
35
35
### Configuration
36
36
37
37
The configuration contains the following:-
38
38
39
-
1.**Endpoints** - This is the list of endpoints which will be enabled. This is not a mandatory parameter. If not provided, then all the endpoints will be enabled. The possible endpoints are - `/env`, `/httpTrace`, `/info`, `/metrics`, `/ping`, `/shutdown` and `/threadDump`. You can find the description of each of these endpoints below.
40
-
41
-
2.**Prefix** - This is the prefix request path for all the configured endpoints.
39
+
1.**Endpoints** - This is the list of endpoints which will be enabled. This is not a mandatory parameter. If not provided, then all the endpoints will be enabled. The possible endpoints are - `/env`, `/info`, `/metrics`, `/ping`, `/shutdown` and `/threadDump`. You can find the description of each of these endpoints below.
40
+
2.**Env** - This is the environment where the application is running. For example, `dev`, `stg`, `prod`, etc.
41
+
3.**Name** - This is the name of the application which is using this actuator library.
42
+
4.**Port** - This is the port where the application is running.
43
+
5.**Version** - This is the current application version.
@@ -105,7 +135,7 @@ This is used to get all the environment variables for the runtime where the appl
105
135
106
136
```shell
107
137
go build
108
-
./${APPLICATION_NAME} -env=${ENVIRONMENT_NAME}
138
+
./${APPLICATION_NAME}
109
139
```
110
140
111
141
```json
@@ -115,59 +145,6 @@ go build
115
145
}
116
146
```
117
147
118
-
### HTTP Trace - `/actuator/httpTrace`
119
-
120
-
This is used to get the trace for the last 100 HTTP requests to your application. Now if this has to be used, then there is an extra configuration has to be done based on the web framework in use.
This is used to get the basic information for an application. To get the correct and relevant information for your application you need to change the build script as well as the run script for your application as follows.
0 commit comments