feat: initial commit
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good

This commit is contained in:
2023-04-24 20:52:12 +02:00
commit e66938f1d3
134 changed files with 8507 additions and 0 deletions

13
internal/store/sort.go Normal file
View File

@ -0,0 +1,13 @@
package store
type ByProxyWeight []*ProxyHeader
func (s ByProxyWeight) Len() int { return len(s) }
func (s ByProxyWeight) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s ByProxyWeight) Less(i, j int) bool { return s[i].Weight > s[j].Weight }
type ByLayerWeight []*LayerHeader
func (s ByLayerWeight) Len() int { return len(s) }
func (s ByLayerWeight) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s ByLayerWeight) Less(i, j int) bool { return s[i].Weight > s[j].Weight }