pomerium/internal/envoy/files/files.go
Caleb Doxsey 9bce8314ba
envoy: refactor envoy embedding (#2296)
* envoy: add full version

* remove unused import

* envoy: refactor envoy embedding

* fix lint

* commit ignored files

* maybe fix test
2021-06-15 08:18:30 -06:00

27 lines
572 B
Go

// Package files contains files for use with envoy.
package files
import (
_ "embed" // for embedded files
"strings"
)
// Binary returns the raw envoy binary bytes.
func Binary() []byte {
return rawBinary
}
// Checksum returns the checksum for the embedded envoy binary.
func Checksum() string {
return strings.Fields(rawChecksum)[0]
}
// FullVersion returns the full version string for envoy.
func FullVersion() string {
return Version() + "+" + Checksum()
}
// Version returns the envoy version.
func Version() string {
return strings.TrimSpace(rawVersion)
}