Skip to content

Commit

Permalink
remove non useful info and add namespaces to encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
dhontecillas committed Nov 21, 2023
1 parent bd00862 commit 9881af4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
47 changes: 26 additions & 21 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,32 @@ func Unmarshal(b []byte, s *Service) error {
}

var componentAlias = map[string]string{
server.Namespace: "a",
client.Namespace: "b",
plugin.Namespace: "c",
proxy.Namespace: "d",
router.Namespace: "e",
bf.Namespace: "f",
botdetector.Namespace: "g",
opencensus.Namespace: "h",
ratelimit.Namespace: "i",
ratelimitProxy.Namespace: "j",
"telemetry/newrelic": "k",
"telemetry/ganalytics": "l",
"telemetry/instana": "m",
jose.ValidatorNamespace: "n",
jose.SignerNamespace: "o",
"auth/api-keys": "p",
httpsecure.Namespace: "q",
gologging.Namespace: "r",
gelf.Namespace: "s",
logstash.Namespace: "t",
"backend/grpc": "u",
server.Namespace: "a",
client.Namespace: "b",
plugin.Namespace: "c",
proxy.Namespace: "d",
router.Namespace: "e",
bf.Namespace: "f",
botdetector.Namespace: "g",
opencensus.Namespace: "h",
ratelimit.Namespace: "i",
ratelimitProxy.Namespace: "j",
"telemetry/newrelic": "k",
"telemetry/ganalytics": "l",
"telemetry/instana": "m",
jose.ValidatorNamespace: "n",
jose.SignerNamespace: "o",
"auth/api-keys": "p",
httpsecure.Namespace: "q",
gologging.Namespace: "r",
gelf.Namespace: "s",
logstash.Namespace: "t",
"backend/grpc": "u",
"auth/basic": "v",
"server/virtualhost": "w",
"server/static-filesystem": "x",
"backend/static-filesystem": "y",
"backend/http/client": "z",
}

func applyAlias(s Service) Service {
Expand Down
10 changes: 0 additions & 10 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,6 @@ func parseComponents(cfg config.ExtraConfig) Component {
}

components[c] = []int{v1}
case "auth/basic":
components[c] = []int{1}
case "backend/grpc":
components[c] = []int{1}
case "server/virtualhost":
components[c] = []int{1}
case "server/static-filesystem":
components[c] = []int{1}
case "backend/static-filesystem":
components[c] = []int{1}
case "backend/http/client":
cfg, ok := v.(map[string]interface{})
if !ok {
Expand Down

0 comments on commit 9881af4

Please sign in to comment.