runtime

package
v0.0.0-...-fe632b3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Cached mesh config
	Mesh meshconfig.Cache

	// Domain suffix to use
	DomainSuffix string
}

Config used by the runtime

type InMemorySource

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

InMemorySource is an implementation of source.Interface.

func NewInMemorySource

func NewInMemorySource() *InMemorySource

NewInMemorySource returns a new instance of InMemorySource.

func (*InMemorySource) Delete

func (s *InMemorySource) Delete(k resource.Key)

Delete a value in the in-memory store.

func (*InMemorySource) Get

func (s *InMemorySource) Get(key resource.Key) (resource.Entry, error)

Get a value in the in-memory store.

func (*InMemorySource) Set

func (s *InMemorySource) Set(k resource.Key, metadata resource.Metadata, item proto.Message)

Set the value in the in-memory store.

func (*InMemorySource) Start

func (s *InMemorySource) Start(handler resource.EventHandler) error

Start implements source.Interface.Start

func (*InMemorySource) Stop

func (s *InMemorySource) Stop()

Stop implements source.Interface.Stop

type Processor

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

Processor is the main control-loop for processing incoming config events and translating them into component configuration

func NewProcessor

func NewProcessor(src Source, distributor publish.Distributor, cfg *Config) *Processor

NewProcessor returns a new instance of a Processor

func (*Processor) Start

func (p *Processor) Start() error

Start the processor. This will cause processor to listen to incoming events from the provider and publish component configuration via the Distributor.

func (*Processor) Stop

func (p *Processor) Stop()

Stop the processor.

type Source

type Source interface {
	// Start the source interface, provided the EventHandler. The initial state of the underlying
	// config store should be reflected as a series of Added events, followed by a FullSync event.
	Start(handler resource.EventHandler) error

	// Stop the source interface. Upon return from this method, the channel should not be accumulating any
	// more events.
	Stop()
}

Source to be implemented by a source configuration provider.

type State

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

State is the in-memory state of Galley.

func (*State) Handle

func (s *State) Handle(event resource.Event)

Handle implements the processing.Handler interface.

func (*State) String

func (s *State) String() string

String implements fmt.Stringer

Directories

Path Synopsis
Package resource contains core abstract types for representing configuration resources.
Package resource contains core abstract types for representing configuration resources.

Jump to

Keyboard shortcuts

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