package example
import "github.com/envoyproxy/go-control-plane/internal/example"
Index ¶
- Constants
- func GenerateSnapshot() *cache.Snapshot
- func RunServer(srv server.Server, port uint)
- type Logger
- func (logger Logger) Debugf(format string, args ...interface{})
- func (logger Logger) Errorf(format string, args ...interface{})
- func (logger Logger) Infof(format string, args ...interface{})
- func (logger Logger) Warnf(format string, args ...interface{})
- type Server
Constants ¶
const ( ClusterName = "example_proxy_cluster" RouteName = "local_route" ListenerName = "listener_0" ListenerPort = 10000 UpstreamHost = "www.envoyproxy.io" UpstreamPort = 80 )
Functions ¶
func GenerateSnapshot ¶
func GenerateSnapshot() *cache.Snapshot
func RunServer ¶
func RunServer(srv server.Server, port uint)
RunServer starts an xDS server at the given port.
Types ¶
type Logger ¶
type Logger struct { Debug bool }
An example of a logger that implements `pkg/log/Logger`. Logs to stdout. If Debug == false then Debugf() and Infof() won't output anything.
func (Logger) Debugf ¶
Log to stdout only if Debug is true.
func (Logger) Errorf ¶
Log to stdout always.
func (Logger) Infof ¶
Log to stdout only if Debug is true.
func (Logger) Warnf ¶
Log to stdout always.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func (*Server) Run ¶
Source Files ¶
logger.go resource.go server.go
Directories ¶
Path | Synopsis |
---|---|
internal/example/main |
- Version
- v0.13.3
- Published
- Jan 2, 2025
- Platform
- windows/amd64
- Imports
- 28 packages
- Last checked
- 49 minutes ago –
Tools for package owners.