app

package
v0.0.0-...-c5c3ca5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Copyright 2020 Envoyproxy Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSnapshot

func GenerateSnapshot(services []string) (*cache.Snapshot, error)

GenerateSnapshot creates snapshot for each service

func RunManagementServer

func RunManagementServer(ctx context.Context, server xds.Server, port uint, maxConcurrentStreams uint32)

RunManagementServer starts an xDS server at the given port.

Types

type Callbacks

type Callbacks struct {
	Signal   chan struct{}
	Fetches  int
	Requests int
	// contains filtered or unexported fields
}

Callbacks for XD Server

func (*Callbacks) OnFetchRequest

func (cb *Callbacks) OnFetchRequest(ctx context.Context, req *v2.DiscoveryRequest) error

OnFetchRequest type

func (*Callbacks) OnFetchResponse

func (cb *Callbacks) OnFetchResponse(req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)

OnFetchResponse type

func (*Callbacks) OnStreamClosed

func (cb *Callbacks) OnStreamClosed(id int64)

OnStreamClosed type

func (*Callbacks) OnStreamOpen

func (cb *Callbacks) OnStreamOpen(ctx context.Context, id int64, typ string) error

OnStreamOpen type

func (*Callbacks) OnStreamRequest

func (cb *Callbacks) OnStreamRequest(id int64, req *v2.DiscoveryRequest) error

OnStreamRequest type

func (*Callbacks) OnStreamResponse

func (cb *Callbacks) OnStreamResponse(id int64, req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)

OnStreamResponse type

func (*Callbacks) Report

func (cb *Callbacks) Report()

Report type

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

func (logger Logger) Debugf(format string, args ...interface{})

Log to stdout only if Debug is true.

func (Logger) Errorf

func (logger Logger) Errorf(format string, args ...interface{})

Log to stdout always.

func (Logger) Infof

func (logger Logger) Infof(format string, args ...interface{})

Log to stdout only if Debug is true.

func (Logger) Warnf

func (logger Logger) Warnf(format string, args ...interface{})

Log to stdout always.

Jump to

Keyboard shortcuts

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