-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
calyptia: generate machine id for fleet agents (#9691)
* calyptia: generate machine id for fleet agents Signed-off-by: Patrick Stephens <[email protected]> * calyptia: add missing include Signed-off-by: Patrick Stephens <[email protected]> * calyptia: add missing include Signed-off-by: Patrick Stephens <[email protected]> * tests: resolve conflicting definitions Signed-off-by: Patrick Stephens <[email protected]> * calyptia: resolve missing bool type Signed-off-by: Patrick Stephens <[email protected]> * calyptia: resolve missing header Signed-off-by: Patrick Stephens <[email protected]> * calyptia: resolve duplicate symbols for tests Signed-off-by: Patrick Stephens <[email protected]> * calyptia: resolve function pointer usage Signed-off-by: Patrick Stephens <[email protected]> * calyptia: update codeowners Signed-off-by: Patrick Stephens <[email protected]> * custom_calyptia: tests: Add missing declarations To link those missing declaration functions, we need to define for stub in the custom_calyptia testing files. Signed-off-by: Hiroshi Hatake <[email protected]> * custom_calyptia: Remove duplicated function declarations Signed-off-by: Hiroshi Hatake <[email protected]> * tests: add calyptia machine id generation tests Signed-off-by: Patrick Stephens <[email protected]> * tests: add missing header Signed-off-by: Patrick Stephens <[email protected]> * tests: fix typos Signed-off-by: Patrick Stephens <[email protected]> * tests: fix typos Signed-off-by: Patrick Stephens <[email protected]> * tests: fix memory issues Signed-off-by: Patrick Stephens <[email protected]> * tests: fix location Signed-off-by: Patrick Stephens <[email protected]> * tests: fix destroy usage Signed-off-by: Patrick Stephens <[email protected]> * tests: fix destroy usage Signed-off-by: Patrick Stephens <[email protected]> --------- Signed-off-by: Patrick Stephens <[email protected]> Signed-off-by: Hiroshi Hatake <[email protected]> Co-authored-by: Hiroshi Hatake <[email protected]>
- Loading branch information
1 parent
9acc096
commit 3e96ec5
Showing
14 changed files
with
489 additions
and
140 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
|
||
/* Fluent Bit | ||
* ========== | ||
* Copyright (C) 2015-2024 The Fluent Bit Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#ifndef FLB_CALYPTIA_CONSTANTS_H | ||
#define FLB_CALYPTIA_CONSTANTS_H | ||
|
||
/* End point */ | ||
#define DEFAULT_CALYPTIA_HOST "cloud-api.calyptia.com" | ||
#define DEFAULT_CALYPTIA_PORT "443" | ||
|
||
/* HTTP action types */ | ||
#define CALYPTIA_ACTION_REGISTER 0 | ||
#define CALYPTIA_ACTION_PATCH 1 | ||
#define CALYPTIA_ACTION_METRICS 2 | ||
#define CALYPTIA_ACTION_TRACE 3 | ||
|
||
/* Endpoints */ | ||
#define CALYPTIA_ENDPOINT_CREATE "/v1/agents" | ||
#define CALYPTIA_ENDPOINT_PATCH "/v1/agents/%s" | ||
#define CALYPTIA_ENDPOINT_METRICS "/v1/agents/%s/metrics" | ||
#define CALYPTIA_ENDPOINT_TRACE "/v1/traces/%s" | ||
|
||
#define CALYPTIA_ENDPOINT_FLEETS "/v1/fleets" | ||
#define CALYPTIA_ENDPOINT_FLEET_CONFIG_INI "/v1/fleets/%s/config?format=ini" | ||
#define CALYPTIA_ENDPOINT_FLEET_FILES "/v1/fleets/%s/files" | ||
|
||
/* Storage */ | ||
#define CALYPTIA_SESSION_FILE "session.CALYPTIA" | ||
|
||
/* Headers */ | ||
#define CALYPTIA_HEADERS_PROJECT "X-Project-Token" | ||
#define CALYPTIA_HEADERS_AGENT_TOKEN "X-Agent-Token" | ||
#define CALYPTIA_HEADERS_CTYPE "Content-Type" | ||
#define CALYPTIA_HEADERS_CTYPE_JSON "application/json" | ||
#define CALYPTIA_HEADERS_CTYPE_MSGPACK "application/x-msgpack" | ||
|
||
#ifndef FLB_SYSTEM_WINDOWS | ||
#define FLEET_DEFAULT_CONFIG_DIR "/tmp/calyptia-fleet" | ||
#else | ||
#define FLEET_DEFAULT_CONFIG_DIR NULL | ||
#endif | ||
|
||
#ifndef PATH_SEPARATOR | ||
#ifndef FLB_SYSTEM_WINDOWS | ||
#define PATH_SEPARATOR "/" | ||
#else | ||
#define PATH_SEPARATOR "\\" | ||
#endif | ||
#endif /* PATH_SEPARATOR */ | ||
|
||
#define CALYPTIA_MAX_DIR_SIZE 4096 | ||
|
||
#endif /* FLB_CALYPTIA_CONSTANTS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.