MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / withHomeAuthCount

Function withHomeAuthCount

sdk/cliproxy/auth/conductor.go:2782–2793  ·  view source on GitHub ↗
(opts cliproxyexecutor.Options, count int)

Source from the content-addressed store, hash-verified

2780}
2781
2782func withHomeAuthCount(opts cliproxyexecutor.Options, count int) cliproxyexecutor.Options {
2783 if count <= 0 {
2784 count = 1
2785 }
2786 meta := make(map[string]any, len(opts.Metadata)+1)
2787 for k, v := range opts.Metadata {
2788 meta[k] = v
2789 }
2790 meta[homeAuthCountMetadataKey] = count
2791 opts.Metadata = meta
2792 return opts
2793}
2794
2795func homeAuthCountFromMetadata(meta map[string]any) int {
2796 if len(meta) == 0 {

Calls

no outgoing calls