Skip to content

Commit b62ad69

Browse files
michel-latermanjuliaElasticAndersonQ
authored
Allow dev stand-alone execution (#2212)
* Add SNAPSHOT only stand alone mode Allow the fleet-server to run independantly of the elastic-agent when a SNAPSHOT is built. When in stand alone mode the fleet-server agent will create an agent record for itself in the agents index with the ID specified in the fleet.yml file. After regular startup the agent will also send checkins to it's API handler in order to appear as a healthy agent in the UI. All config is read from the fleet.yml file. Actions and policy changes are ignored. action seq numbers are not persisted. * Add license headers * test fixes * Change to DEV flag, add readme * minor cleanup * add old config for testing * fix stand alone yml * Fix data race in tests caused by logger contention * Fix setup issue * Add tls instructions * return default load limits when passed a 0 value * Update internal/pkg/server/standAlone_release.go Co-authored-by: Anderson Queiroz <me@andersonq.me> * Update internal/pkg/server/standAlone_release.go Co-authored-by: Anderson Queiroz <me@andersonq.me> * Update README.md Co-authored-by: Anderson Queiroz <me@andersonq.me> * Update internal/pkg/server/standAlone_dev.go Co-authored-by: Anderson Queiroz <me@andersonq.me> * Update internal/pkg/server/standAlone_dev.go Co-authored-by: Anderson Queiroz <me@andersonq.me> * removed commented code * added changelog * standalone:false for integration test Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Co-authored-by: Anderson Queiroz <me@andersonq.me> Co-authored-by: Julia Bardi <julia.bardi@elastic.co>
1 parent a581ba4 commit b62ad69

24 files changed

+416
-188
lines changed

CHANGELOG.next.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
- Storing checkin message in last_checkin_message {pull}1932[1932]
3636
- Allow upgrade actions to signal that they will be retried. {pull}1887[1887]
3737
- Replaced upgrade expiration and minimum_execution_duration with rollout_duration_seconds. {pull}2243[2243]
38+
- Document how to run fleet server locally. {issue}1423[1423] {pull}2212[2212]

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ list-platforms: ## - Show the possible PLATFORMS
5454
.PHONY: local
5555
local: ## - Build local binary for local environment (bin/fleet-server)
5656
@printf "${CMD_COLOR_ON} Build binaries using local go installation\n${CMD_COLOR_OFF}"
57-
go build -gcflags="${GCFLAGS}" -ldflags="${LDFLAGS}" -o ./bin/fleet-server .
57+
go build $(if $(DEV),-tags="dev",) -gcflags="${GCFLAGS}" -ldflags="${LDFLAGS}" -o ./bin/fleet-server .
5858
@printf "${CMD_COLOR_ON} Binaries in ./bin/\n${CMD_COLOR_OFF}"
5959

6060
.PHONY: clean
@@ -147,7 +147,7 @@ $(PLATFORM_TARGETS): release-%:
147147
$(eval $@_GO_ARCH := $(lastword $(subst /, ,$(lastword $(subst release-, ,$@)))))
148148
$(eval $@_ARCH := $(TARGET_ARCH_$($@_GO_ARCH)))
149149
$(eval $@_BUILDMODE:= $(BUILDMODE_$($@_OS)_$($@_GO_ARCH)))
150-
GOOS=$($@_OS) GOARCH=$($@_GO_ARCH) go build -gcflags="${GCFLAGS}" -ldflags="${LDFLAGS}" $($@_BUILDMODE) -o build/binaries/fleet-server-$(VERSION)-$($@_OS)-$($@_ARCH)/fleet-server .
150+
GOOS=$($@_OS) GOARCH=$($@_GO_ARCH) go build $(if $(DEV),-tags="dev",) -gcflags="${GCFLAGS}" -ldflags="${LDFLAGS}" $($@_BUILDMODE) -o build/binaries/fleet-server-$(VERSION)-$($@_OS)-$($@_ARCH)/fleet-server .
151151
@$(MAKE) OS=$($@_OS) ARCH=$($@_ARCH) package-target
152152

153153
.PHONY: package-target

README.md

+97-111
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,152 @@
11
[![Build Status](https://fleet-ci.elastic.co/job/fleet-server/job/fleet-server-mbp/job/main/badge/icon)](https://fleet-ci.elastic.co/job/Ingest-manager/job/fleet-server/job/main/)
22

3-
# Fleet Server implementation
3+
# Fleet Server
44

5-
## Development
6-
7-
fleet-server is under development. The following are notes to help developers onboarding to the project to quickly get running. These notes might change at any time.
5+
Fleet server is the control server to manage a fleet of [elastic-agents](https://github.com/elastic/elastic-agent).
86

9-
## Setup for fleet-server development
7+
For production deployments the fleet-server is supervised and bootstrapped by an elastic-agent.
108

11-
### ES and Kinaba from SNAPSHOTS API
9+
To assist with development the fleet-server may run in a stand-alone mode.
1210

13-
Download them from the snapshots API:
14-
Edit the version and OS/arch to suit your system, or [check the API](https://artifacts-api.elastic.co/v1/search/8.4-SNAPSHOT) (change the version if needed) if the ones below does not suit you.
15-
- 8.4.0-SNAPSHOT-linux-x86_64.tar.gz
16-
- 8.4.0-SNAPSHOT-darwin-aarch64.tar.gz
17-
- 8.4.0-SNAPSHOT-windows-x86_64.zip
11+
## Compatibility and upgrades
1812

19-
TODO: parse the JSON to get the URL
20-
```shell
21-
wget https://snapshots.elastic.co/8.4.0-64eb2b35/downloads/elasticsearch/elasticsearch-8.4.0-SNAPSHOT-linux-x86_64.tar.gz
22-
wget https://snapshots.elastic.co/8.4.0-64eb2b35/downloads/kibana/kibana-8.4.0-SNAPSHOT-linux-x86_64.tar.gz
13+
Fleet-server communicates with Elasticsearch. Elasticsearch must be on the same version or newer.
14+
Fleet server is always on the exact same version as the Elastic Agent running fleet-server.
15+
Any Elastic Agent enrolling into a fleet-server must be the same version or older.
16+
For Kibana it is assumed it is on the same version as Elasticsearch. With this the compatibility looks as following:
2317
```
24-
25-
Follow the instructions for [ElasticSearch](https://www.elastic.co/downloads/elasticsearch) and [Kibana](https://www.elastic.co/downloads/kibana)
26-
27-
### fleet-server+agent on a Vagrant VM
28-
29-
The Vagrant machine assumes the `elastic-agent`, `beats` and `fleet-server` repos are in the same folder.
30-
Thus, it mounts `../` to `/vagrant` on the Vagrant machine. The vagrant machine IP address is `192.168.56.43`.
31-
Use `https://192.168.56.43:8220` as fleet-server host.
32-
33-
### Grab or build the Elastic-Agent
34-
35-
For detailed instructions, check the [Elastic-Agent](https://github.com/elastic/elastic-agent) repo.
36-
```shell
37-
cd YOUR_ELASTIC_AGENT_FOLDER
38-
SNAPSHOT=true EXTERNAL=true PLATFORMS="linux/amd64" PACKAGES="tar.gz" mage -v dev:package # adjust PLATFORMS and PACKAGES to your system and needs.
18+
Elastic Agent <= Elastic Agent with fleet-server <= Elasticsearch / Kibana
3919
```
4020

41-
### Build and Package
21+
There might be differences on the bugfix version.
4222

43-
Change `release-linux/amd64` to `release-YOUR_OS/platform`. Run `make list-platforms` to check
44-
out the possible values.
23+
For upgrades Elasticsearch/Kibana must be upgraded first, then the Elastic Agent with fleet-server followed by any other Elastic Agents.
4524

46-
The `DEV=true` will allow the binary to be debugged ~~with a debugger~~.
25+
## MacOSX Version
4726

48-
```shell
49-
DEV=true SNAPSHOT=true make release-linux/amd64
27+
The [golang-crossbuild](https://github.com/elastic/golang-crossbuild) produces images used for testing/building.
28+
The `golang-crossbuild:1.16.X-darwin-debian10` images expects the minimum MacOSX version to be 10.14+.
5029

51-
vagrant up
52-
vagrant ssh
53-
```
30+
## Development
5431

55-
For the Elastic-Agent to use your build of the fleet-server, unpack the elastic agent and add your fleet-server tar.gz and sha512 to
56-
`elastic-agent-8.Y.Z-SNAPSHOT-OS-ARCH/data/elastic-agent-*/downloads/`.
32+
The following are notes to help developers onboarding to the project to quickly get running. These notes might change at any time.
5733

58-
Then go to `Kibana > Managment > Fleet` and follow the instructions there.
34+
### Development build
5935

60-
#### tl;dr/example:
36+
To compile the fleet-server in development mode set the env var `DEV=true`.
37+
When compiled in development mode the fleet-server will support debugging and stand-alone execution.
38+
i.e.:
6139
```shell
62-
cp /vagrant/elastic-agent/build/distributions/elastic-agent-8.4.0-SNAPSHOT-linux-x86_64.tar.gz* ./
63-
tar xzvf elastic-agent-8.4.0-SNAPSHOT-linux-x86_64.tar.gz
64-
cd elastic-agent-8.4.0-SNAPSHOT-linux-x86_64
65-
cp /vagrant/fleet-server/build/distributions/fleet-server-8.4.0-SNAPSHOT-linux-x86_64.tar.gz* ./data/elastic-agent-494b79/downloads/
66-
./elastic-agent install ...
40+
SNAPSHOT=true DEV=true make release-darwin/amd64
41+
GOOS=darwin GOARCH=amd64 go build -tags="dev" -gcflags="all=-N -l" -ldflags="-X main.Version=8.7.0 -X main.Commit=31668e0 -X main.BuildTime=2022-12-23T20:06:20Z" -buildmode=pie -o build/binaries/fleet-server-8.7.0-darwin-x86_64/fleet-server .
6742
```
6843

69-
## Setup for Elastic-Agent development
44+
Change `release-darwin/amd64` to `release-YOUR_OS/platform`.
45+
Run `make list-platforms` to check out the possible values.
7046

71-
### From source
72-
To run and test fleet-server, a recent version of Elastic Agent and Kibana are needed. In the following Elastic Agent and Kibana are built from source. The fleet-server itself is not built from source but pulled from the latest snapshot build. It would be possible to also pull Elastic Agent or Kibana from the latest snapshot but the assumption that is made here that whoever is testing this, is likely developing either Elastic Agent or on the Kibana side.
47+
The `SNAPSHOT` flag sets the snapshot version flag.
7348

49+
### Running a development build
7450

75-
### Kibana setup
51+
#### ES and Kibana from SNAPSHOTS API on host
7652

77-
The source code of Kibana must be checked out. After checkout, the following command must be run:
53+
Download SNAPSHOT builds for Elasticsearch and Kibana from the snapshots API:
54+
Edit the version and OS/arch to suit your system, or [check the API](https://artifacts-api.elastic.co/v1/search/8.7-SNAPSHOT) (change the version if needed) if the ones below does not suit you.
55+
- 8.7.0-SNAPSHOT-linux-x86_64.tar.gz
56+
- 8.7.0-SNAPSHOT-darwin-aarch64.tar.gz
57+
- 8.7.0-SNAPSHOT-windows-x86_64.zip
7858

59+
TODO: parse the JSON to get the URL
60+
```shell
61+
wget https://snapshots.elastic.co/8.7.0-19f30181/downloads/elasticsearch/elasticsearch-8.7.0-SNAPSHOT-linux-x86_64.tar.gz
62+
wget https://snapshots.elastic.co/8.7.0-19f30181/downloads/kibana/kibana-8.7.0-SNAPSHOT-linux-x86_64.tar.gz
7963
```
80-
yarn kbn bootstrap
81-
```
82-
83-
This will take a while the first time it is run. An error might be return in case not a valid node version is installed. Use nvm to install the correct version.
8464

85-
Now the following two commands must be run in parallel:
86-
87-
```
88-
# Start ES
89-
yarn es snapshot -E xpack.security.authc.api_key.enabled=true
65+
Generally you will need to unarchive and run the binaries:
9066

91-
# Start KB
92-
yarn start --no-base-path
67+
```shell
68+
tar -xzf elasticsearch-8.7.0-SNAPSHOT-linux-x86_64.tar.gz
69+
cd elasticsearch-8.7.0-SNAPSHOT
70+
./bin/elasticsearch
9371
```
9472

95-
As soon as all is running, go to `http://localhost:5601`, enter `elastic/changeme` as credential and navigate to Fleet. Trigger the Fleet setup. As soon as this is completed, copy the `policy id` and `enrollment token` for the fleet-server policy. The policy id can be copied from the URL, the enrollment token can be found in the Enrollment Token list.
96-
97-
NOTE: This step can be skipped if the full command below for the Elastic Agent is used.
73+
The elasticsearch output will output the `elastic` user's password and a Kibana configuration string.
9874

99-
Now Kibana is running and ready. The next step is to setup Elastic Agent.
75+
```shell
76+
tar -xzf kibana-8.7.0-SNAPSHOT-linux-x86_64.tar.gz
77+
cd kibana-8.7.0-SNAPSHOT
78+
./bin/kibana
79+
```
10080

101-
## Elastic-Agent
81+
The kibana output will show a URL that will need to be visted in order to configure Kibana with the string elasticsearch provides.
10282

103-
To build the Elastic Agent from source, check out the [elastic-agent repository](https://github.com/elastic/elastic-agent), then run the following command:
83+
More instructions for setup can be found in the [Elastic Stack Installation Guide](https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html).
10484

105-
```
106-
SNAPSHOT=true DEV=true PLATFORMS=linux|darwin|windows mage package
107-
```
85+
#### fleet-server stand alone
10886

109-
The above assumes you are running on OS X. Set `PLATFORMS` to the one in you are running on. This speeds up packaging as it only builds it for your platform. As soon as this is completed (it might take a while for the first time) navigate to `build/distributions` and unpackage the `.tar.gz`. Change working directory to the elastic-agent directory and start the Elastic Agent:
87+
Access the Fleet UI on Kibana and generate a fleet-server policy.
88+
Set the following env vars with the information from Kibana:
89+
- `ELASTICSEARCH_CA_TRUSTED_FINGERPRINT`
90+
- `ELASTICSEARCH_SERVICE_TOKEN`
91+
- `FLEET_SERVER_POLICY_ID`
11092

111-
```
112-
KIBANA_HOST=http://localhost:5601 KIBANA_USERNAME=elastic KIBANA_PASSWORD=changeme ELASTICSEARCH_HOST=http://localhost:9200 ELASTICSEARCH_USERNAME=elastic ELASTICSEARCH_PASSWORD=changeme KIBANA_FLEET_SETUP=1 FLEET_SERVER_ENABLE=1 sudo ./elastic-agent container
93+
Create a self-signed TLS CA and cert+key for the fleet-server instance, you can use [elasticsearch-certutil](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html) for this:
94+
```shell
95+
# Create a CA
96+
../elasticsearch/bin/elasticsearch-certutil ca --pem --out stack.zip
97+
unzip stack.zip
98+
# Create a cert+key
99+
../elasticsearch/bin/elasticsearch-certutil cert --pem --ca-cert ca/ca.crt --ca-key ca/ca.key --ip $HOST_IP_ADDR --out cert.zip
100+
unzip cert.zip
113101
```
114102

115-
This will start up Elastic Agent with fleet-server and directly enroll it. In addition, Fleet is set up inside Kibana. In case the setup is done already in Kibana manually, the following command can be used:
103+
Ensure that `server.ssl.enabled: true` is set as well as the `server.ssl.certificate` and `server.ssl.key` attributes in `fleet-server.yml`
116104

105+
Then run the fleet-server:
106+
```shell
107+
./build/binaries/fleet-server-8.7.0-darwin-x86_64/fleet-server -c fleet-server.yml
117108
```
118-
sudo ./elastic-agent enroll --fleet-server=http://elastic:changeme@localhost:9200 --fleet-server-policy={fleet-server-policy-id} --enrollment-token={policy-enrollment-token}
119-
```
120-
121-
## Running Elastic Agent with fleet-server in container
109+
By default the fleet-server will attempt to connect to Elasticsearch on `https://localhost:9200`, if this needs to be changed set it with `ELASTICSEARCH_HOSTS`
110+
The fleet-server should appear as an agent with the ID `dev-fleet-server`.
122111

123-
If you want to run Elastic Agent and fleet-server in a container but built Kibana from source, you have to add the following to your `config/kibana.dev.yml`:
124-
125-
```
126-
server.host: 0.0.0.0
127-
```
112+
Any additional agents will need the `ca/ca.crt` file to enroll (or will need to use the `--insecure` flag).
128113

129-
This makes sure, Kibana is accessible from the container. Start Kibana as before but for Elasticsearch, run the following command:
114+
#### fleet-server+agent on a Vagrant VM
130115

131-
```
132-
yarn es snapshot -E xpack.security.authc.api_key.enabled=true -E http.host=0.0.0.0
116+
The development Vagrant machine assumes the `elastic-agent`, `beats`, and `fleet-server` repos are in the same folder.
117+
Thus, it mounts `../` to `/vagrant` on the Vagrant machine. The vagrant machine IP address is `192.168.56.43`.
118+
Use `https://192.168.56.43:8220` as fleet-server host.
119+
```shell
120+
vagrant up
121+
vagrant ssh
133122
```
134123

135-
This makes sure also Elasticsearch is accessible to the container.
124+
##### Build the elastic-agent
136125

137-
Start the Elastic Agent with the following command:
138-
139-
```
140-
docker run -e KIBANA_HOST=http://{YOUR-IP}:5601 -e KIBANA_USERNAME=elastic -e KIBANA_PASSWORD=changeme -e ELASTICSEARCH_HOST=http://{YOUR-IP}:9200 -e ELASTICSEARCH_USERNAME=elastic -e ELASTICSEARCH_PASSWORD=changeme -e KIBANA_FLEET_SETUP=1 -e FLEET_SERVER_ENABLE=1 -e FLEET_SERVER_INSECURE_HTTP=1 docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT
126+
Once in the Vagrant VM, and assuming that the repos are correctly mounted in `/vagrant`.
127+
Build the agent by running:
128+
```shell
129+
cd /vagrant/elastic-agent
130+
SNAPSHOT=true EXTERNAL=true PLATFORMS="linux/amd64" PACKAGES="tar.gz" mage -v dev:package # adjust PLATFORMS and PACKAGES to your system and needs.
141131
```
142132

143-
Replace {YOUR-IP} with the IP address of your machine.
133+
For detailed instructions, check the [Elastic-Agent](https://github.com/elastic/elastic-agent) repo.
144134

145-
## fleet-server repo
135+
##### Run the elastic-agent+fleet-server in Vagrant
146136

147-
By default the above will download the most recent snapshot build for fleet-server. To use your own development build, run `make release` in the fleet-server repository, go to `build/distributions` and copy the `.tar.gz` and `sha512` file to the `data/elastic-agent-{hash}/downloads` inside the elastic-agent directory. Now you run with your own build of fleet-server.
137+
Copy and unpack the elastic-agent `.tar.gz` file and replace the `fleet-server` binary in `elastic-agent-8.Y.Z-SNAPSHOT-OS-ARCH/data/elastic-agent-*/components/` with the snapshot from the fleet-server repo.
148138

139+
Then go to `Kibana > Managment > Fleet` and follow the instructions there.
149140

150-
## Compatibility and upgrades
141+
The vagrant machine IP address is `192.168.56.43`.
142+
Use `https://192.168.56.43:8220` as fleet-server host.
151143

152-
Fleet server is always on the exact same version as Elastic Agent running fleet-server. Any Elastic Agent enrolling into a fleet-server must be the same version or older. Fleet-server communicates with Elasticsearch. Elasticsearch must be on the same version or newer. For Kibana it is assumed it is on the same version as Elasticsearch. With this the compatibility looks as following:
144+
##### tl;dr/example:
153145

146+
```shell
147+
cp /vagrant/elastic-agent/build/distributions/elastic-agent-8.7.0-SNAPSHOT-linux-x86_64.tar.gz* ./
148+
tar -xzf elastic-agent-8.7.0-SNAPSHOT-linux-x86_64.tar.gz
149+
cd elastic-agent-8.7.0-SNAPSHOT-linux-x86_64
150+
cp build/binaries/fleet-server-8.7.0-SNAPSHOT-linux-x86_64/fleet-server ./data/elastic-agent-494b79/components/
151+
./elastic-agent install ...
154152
```
155-
Elastic Agent <= Elastic Agent with fleet-server) <= Elasticsearch / Kibana
156-
```
157-
158-
There might be differences on the bugfix version.
159-
160-
If an upgrade is done, Elasticsearch / Kibana have to be upgraded first, then Elastic Agent with fleet-server and last the Elastic Agents.
161-
162-
163-
## MacOSX Version
164-
165-
The [golang-crossbuild](https://github.com/elastic/golang-crossbuild) produces images used for testing/building.
166-
The `golang-crossbuild:1.16.X-darwin-debian10` images expects the minimum MacOSX version to be 10.14+.

cmd/fleet/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func getRunCommand(bi build.Info) func(cmd *cobra.Command, args []string) error
112112
return err
113113
}
114114

115-
srv, err := server.NewFleet(bi, state.NewLog())
115+
srv, err := server.NewFleet(bi, state.NewLog(), true)
116116
if err != nil {
117117
return err
118118
}

fleet-server.yml

+14-45
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,31 @@
1+
# This config is intended to be used with a stand-alone fleet-server instance for development.
12
output:
23
elasticsearch:
3-
hosts: '${ELASTICSEARCH_HOSTS:localhost:9200}'
4+
hosts: '${ELASTICSEARCH_HOSTS:https://localhost:9200}'
45
service_token: '${ELASTICSEARCH_SERVICE_TOKEN}'
6+
ssl.ca_trusted_fingerprint: '${ELASTICSEARCH_CA_TRUSTED_FINGERPRINT}'
57

68
fleet:
79
agent:
8-
id: 1e4954ce-af37-4731-9f4a-407b08e69e42
9-
logging:
10-
level: '${LOG_LEVEL:DEBUG}'
10+
id: '${FLEET_SERVER_AGENT_ID:dev-fleet-server}'
1111

12-
# Input config provided by the Elastic Agent for the server
13-
#inputs:
14-
# - type: fleet-server
12+
inputs:
13+
- type: fleet-server
14+
policy.id: '${FLEET_SERVER_POLICY_ID:fleet-server-policy}'
1515
# server:
16-
# host: localhost
17-
# port: 8220
18-
# timeouts:
19-
# checkin_long_poll: 300s # long poll timeout
20-
# instrumentation:
21-
# enabled: false
22-
# hosts: ["localhost:8200"]
23-
# profiler:
24-
# enabled: true # enable profiler
25-
# limits:
26-
# policy_throttle: 100ms
27-
# max_connetions: 150
28-
# checkin_limit:
29-
# interval: 100ms
30-
# burst: 25
31-
# max: 100
32-
# artifact_limit:
33-
# interval: 10ms
34-
# burst: 5
35-
# max: 10
36-
# ack_limit:
37-
# interval: 10ms
38-
# burst: 20
39-
# max: 10
40-
# enroll_limit:
41-
# interval: 50ms
42-
# burst: 10
43-
# max: 8
44-
# ssl:
45-
# enabled: true
46-
# certificate: /creds/cert.pem
47-
# key: /creds/key.pem
48-
# cache:
49-
# num_counters: 500000 # 10x times expected count
50-
# max_cost: 50 * 1024 * 1024 # 50MiB cache size
16+
# ssl:
17+
# enabled: true
18+
# certificate: /creds/cert.pem
19+
# key: /creds/key.pem
20+
# key_passphrase: /creds/key.pem
5121

5222
logging:
5323
to_stderr: true # Force the logging output to stderr
54-
#level: trace
24+
pretty: true
25+
level: '${LOG_LEVEL:DEBUG}'
5526

5627
# Enables the stats endpoint under http://localhost:5601 by default.
5728
# Additional stats can be found under http://127.0.0.1:5066/stats and http://127.0.0.1:5066/state
5829
http.enabled: true
5930
#http.host: http://127.0.0.1
6031
#http.port: 5601
61-
#http.named_pipe.user:
62-
#http.named_pipe.security_descriptor:

internal/pkg/api/handleCheckin.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ func (ct *CheckinT) handleCheckin(zlog *zerolog.Logger, w http.ResponseWriter, r
135135

136136
// Safely check if the agent version is different, return empty string otherwise
137137
newVer := agent.CheckDifferentVersion(ver)
138-
return ct.processRequest(*zlog, w, r, start, agent, newVer)
138+
return ct.ProcessRequest(*zlog, w, r, start, agent, newVer)
139139
}
140140

141-
func (ct *CheckinT) processRequest(zlog zerolog.Logger, w http.ResponseWriter, r *http.Request, start time.Time, agent *model.Agent, ver string) error {
141+
func (ct *CheckinT) ProcessRequest(zlog zerolog.Logger, w http.ResponseWriter, r *http.Request, start time.Time, agent *model.Agent, ver string) error {
142142

143143
ctx := r.Context()
144144

0 commit comments

Comments
 (0)