endpoint

package
v0.0.0-...-bf9fd61 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const FileWatcherCertProviderName = "file_watcher"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	CertProviders map[string]CertificateProvider `json:"certificate_providers,omitempty"`
}

func (*Bootstrap) FileWatcherProvider

func (b *Bootstrap) FileWatcherProvider() *FileWatcherCertProviderConfig

FileWatcherProvider returns the FileWatcherCertProviderConfig if one exists in CertProviders

type CertificateProvider

type CertificateProvider struct {
	PluginName string                        `json:"plugin_name,omitempty"`
	Config     FileWatcherCertProviderConfig `json:"config,omitempty"`
}

type Config

type Config struct {
	IsServerReady IsServerReadyFunc
	Version       string
	Cluster       string
	TLSCert       string
	TLSKey        string
	UDSServer     string
	Dialer        common.Dialer
	Port          *common.Port
	ListenerIP    string
	IstioVersion  string
	Namespace     string
	DisableALPN   bool
}

Config for a single endpoint Instance.

type EchoGrpcHandler

type EchoGrpcHandler struct {
	proto.UnimplementedEchoTestServiceServer
	Config
	Forwarder *forwarder.Instance
}

func (*EchoGrpcHandler) Echo

func (*EchoGrpcHandler) ForwardEcho

type FileWatcherCertProviderConfig

type FileWatcherCertProviderConfig struct {
	CertificateFile   string          `json:"certificate_file,omitempty"`
	PrivateKeyFile    string          `json:"private_key_file,omitempty"`
	CACertificateFile string          `json:"ca_certificate_file,omitempty"`
	RefreshDuration   json.RawMessage `json:"refresh_interval,omitempty"`
}

type Instance

type Instance interface {
	io.Closer
	Start(onReady OnReadyFunc) error
	GetConfig() Config
}

Instance of an endpoint that serves the Echo application on a single port/protocol.

func New

func New(cfg Config) (Instance, error)

New creates a new endpoint Instance.

type IsServerReadyFunc

type IsServerReadyFunc func() bool

IsServerReadyFunc is a function that indicates whether the server is currently ready to handle traffic.

type OnReadyFunc

type OnReadyFunc func()

OnReadyFunc is a callback function that informs the server that the endpoint is ready.

Jump to

Keyboard shortcuts

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