mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-24 03:07:57 -04:00
* fix updated_at logic for previous month, add tests * improvement: separate out metric names into consts * wholistically cover all metrics in billing api test * add actual totp data in the ent test * fix more wording errors * feedback: remove consts and use metric names directly * fix a test * simplify the logic around refreshing data * simplify the logic by centralizing the atomic tracker interacting inside updateBillingMetrics method, fix the logic inside the endpoint, add tests * miner fixes * feedback: set time tracker to zero at set up and at start of month to indicate data has not been updated yet, update test * attempt to fix deadlock by using statelock free version of update billing metrics method * remove unnecessary locks inside request handling * remove duplicate methods - instead create 2 wrappers around the method one with lock and one without * add a new prefix and methods to store and retrieve last update time * add comments to explain local prefix behavior for the update method * replace atomic tracker with storage methods * add method level tests for the update time storage methods * add external tests to verify perf replicated cluster independelty track last update time now * normalize time to utc before storing to storage, fix comments * code scanql feedback: remove logging of raw error to prevent leakage * feedback: reorganize and refactor update billing metric method wrappers * feedback: add go doc to the get method * feedback: retrieve stored update time for last month, instead of always putting end of month inside computeUpdatedTime * use equal test instead of within duration inside util tests * use require equal inside external tests too * use end of the requested month inside the endpoint for past months * update tests * add a new test case for when time is not stored in storage * fix a bug: add nil check before passing role counts and managed key counts to update method * feedback: remove update call of of time inside setup billing * Update vault/consumption_billing_util.go * Update vault/logical_system_use_case_billing.go * Update vault/logical_system_use_case_billing.go * comment fix * feedback: do not allow refresh on perf standby, add a warning and just retrieve stored data * add tests --------- Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com> Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| cliconfig | ||
| test-fixtures | ||
| tokenhelper | ||
| .copywrite.hcl | ||
| api_test.go | ||
| auth.go | ||
| auth_test.go | ||
| auth_token.go | ||
| client.go | ||
| client_test.go | ||
| go.mod | ||
| go.sum | ||
| hcl_dup_attr_deprecation.go | ||
| help.go | ||
| kv.go | ||
| kv_test.go | ||
| kv_v1.go | ||
| kv_v2.go | ||
| LICENSE | ||
| lifetime_watcher.go | ||
| logical.go | ||
| logical_requests.go | ||
| logical_requests_test.go | ||
| logical_test.go | ||
| output_policy.go | ||
| output_policy_test.go | ||
| output_string.go | ||
| plugin_helpers.go | ||
| plugin_runtime_types.go | ||
| plugin_types.go | ||
| plugin_types_test.go | ||
| pluginruntimetype_enumer.go | ||
| README.md | ||
| renewbehavior_enumer.go | ||
| renewer_test.go | ||
| replication_status.go | ||
| request.go | ||
| request_test.go | ||
| response.go | ||
| secret.go | ||
| secret_test.go | ||
| ssh.go | ||
| ssh_agent.go | ||
| ssh_agent_test.go | ||
| sudo_paths.go | ||
| sudo_paths_test.go | ||
| sys.go | ||
| sys_audit.go | ||
| sys_auth.go | ||
| sys_billing.go | ||
| sys_billing_test.go | ||
| sys_capabilities.go | ||
| sys_config_cors.go | ||
| sys_generate_root.go | ||
| sys_hastatus.go | ||
| sys_health.go | ||
| sys_init.go | ||
| sys_leader.go | ||
| sys_leases.go | ||
| sys_mfa.go | ||
| sys_monitor.go | ||
| sys_mounts.go | ||
| sys_mounts_test.go | ||
| sys_plugins.go | ||
| sys_plugins_runtimes.go | ||
| sys_plugins_runtimes_test.go | ||
| sys_plugins_test.go | ||
| sys_policy.go | ||
| sys_raft.go | ||
| sys_rekey.go | ||
| sys_reporting_scan.go | ||
| sys_rotate.go | ||
| sys_seal.go | ||
| sys_stepdown.go | ||
| sys_ui_custom_message.go | ||
| sys_ui_custom_message_test.go | ||
| sys_utilization_report.go | ||
Vault API
This provides the github.com/hashicorp/vault/api package which contains code useful for interacting with a Vault server.
For examples of how to use this module, see the vault-examples repo. For a step-by-step walkthrough on using these client libraries, see the developer quickstart.
