filemgr

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package filemgr defines a Manager for managing files for the controlplane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

A Manager manages files for envoy.

func NewManager

func NewManager(options ...Option) *Manager

NewManager creates a new Manager.

func (*Manager) BytesDataSource

func (mgr *Manager) BytesDataSource(fileName string, data []byte) *envoy_config_core_v3.DataSource

BytesDataSource returns an envoy config data source based on bytes.

func (*Manager) ClearCache

func (mgr *Manager) ClearCache()

ClearCache clears the file cache.

func (*Manager) FileDataSource

func (mgr *Manager) FileDataSource(filePath string) *envoy_config_core_v3.DataSource

FileDataSource returns an envoy config data source based on a file.

type Option

type Option = func(*config)

An Option updates the config.

func WithCacheDir

func WithCacheDir(cacheDir string) Option

WithCacheDir returns an Option that sets the cache dir.

Jump to

Keyboard shortcuts

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