pomerium/config
Joe Kralicky 18cb47421a
Optimize Policy RouteID and Checksum
This significantly optimizes the (*Policy).RouteID() and
(*Policy).Checksum() methods for both speed and memory usage.

A new method (*Policy).ChecksumWithID(uint64) can be used to skip a call
to RouteID() if the ID is already known. Checksum() is implemented in
terms of this new method, and will always recompute the route ID on each
call.

RouteID() does not allocate heap memory. Checksum() may allocate heap memory,
depending on which fields are set. If all of the following are true,
Checksum() makes zero allocations:
1. The policy uses redirect or direct-response mode
2. The policy has no sub-policies
3. The policy has no response header rewrite config
2024-11-05 15:59:39 -05:00
..
envoyconfig Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
testdata
autocert.go core/ci: update linting (#4844) 2023-12-14 09:07:54 -08:00
autocert_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
codec_type.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
codec_type_test.go config: default to http2 (#3660) 2022-10-12 14:46:06 -06:00
config.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
config_source.go Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
config_source_test.go Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
constants.go core/config: implement direct response (#4960) 2024-02-15 14:33:56 -07:00
crypt.go Core-Zero Import (#5288) 2024-10-09 18:51:56 -04:00
custom.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
custom_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
doc.go
from.go core/config: add support for stripping the port for matching routes (#5085) 2024-04-26 08:24:46 -06:00
from_test.go core/config: add support for stripping the port for matching routes (#5085) 2024-04-26 08:24:46 -06:00
helpers.go core/redis: remove redis (#4768) 2023-11-28 13:14:36 -07:00
helpers_test.go
http.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
http_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
identity.go Optimize policy iterators (#5184) 2024-08-20 12:35:10 -04:00
layered.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
layered_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
log.go core/config: remove debug option, always use json logs (#4857) 2023-12-15 11:29:05 -07:00
log_level.go config: validate log levels (#4367) 2023-07-17 16:41:48 -06:00
metrics.go logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
metrics_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
mtls.go Core-Zero Import (#5288) 2024-10-09 18:51:56 -04:00
mtls_test.go add mTLS UserPrincipalName SAN match (#5177) 2024-07-26 10:23:19 -07:00
options.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
options_check.go config: suppress unused warnings for all fields in embedded route envoy options (#5330) 2024-10-22 16:46:22 -04:00
options_test.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
policy.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
policy_export_test.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
policy_ppl.go ppl: fix empty/no-op allow block added in some cases to converted PPL policies (#5289) 2024-09-16 18:52:54 -04:00
policy_ppl_test.go ppl: more flexible matchers (#5336) 2024-10-25 07:56:57 -06:00
policy_test.go Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
runtime_flags.go proxy: deprecate the /.pomerium/jwt endpoint (#5254) 2024-09-04 11:22:18 -07:00
session.go core/proxy: support loading sessions from headers and query string (#5291) 2024-09-19 09:23:13 -06:00
session_test.go core/proxy: support loading sessions from headers and query string (#5291) 2024-09-19 09:23:13 -06:00
trace.go logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
trace_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
validate.go config: add cookie_same_site option (#4148) 2023-05-03 14:36:42 -06:00