util

package
v0.0.0-...-20904cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteToDisk

func WriteToDisk(fileName string, data []byte) error

WriteToDisk writes some data to disk

Types

type Config

type Config struct {
	PrometheusPath          string
	PrometheusListenAddress string

	// Prototype (Control plane)
	PrototypeURL string

	// ProtoD (Data plane)
	Cluster     string
	Service     string
	Tags        []string
	RefreshWait time.Duration
}

type EnvoyInfo

type EnvoyInfo struct {
	Version   string `json:"version"`
	State     string `json:"state"`
	Uptime    string `json:"uptime"`
	Timestamp int64  `json:"timestamp"`
}

type HTTPpayload

type HTTPpayload struct {
	Cluster string `json:"cluster"`
	Service string `json:"service"`
	Type    string `json:"type"`
	Config  string `json:"config"`
}

type PrototypeRequest

type PrototypeRequest struct {
	Cluster   string     `json:"cluster"`
	Service   string     `json:"service"`
	ID        string     `json:"id"`
	Tags      []string   `json:"tags"`
	EnvoyInfo *EnvoyInfo `json:"envoy_info"`
}

func DecodeFromBytes

func DecodeFromBytes(q []byte) (PrototypeRequest, error)

func (PrototypeRequest) EncodeToBytes

func (m PrototypeRequest) EncodeToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL