istio: istio.io/istio/galley/pkg/runtime Index | Files | Directories

package runtime

import "istio.io/istio/galley/pkg/runtime"

Index

Package Files

config.go distributor.go processor.go source.go state.go

type Config Uses

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

    // Domain suffix to use
    DomainSuffix string

    // Schema for runtime
    Schema *resource.Schema

    // Enable Service Entry processing
    SynthesizeServiceEntries bool
}

Config used by the runtime

type Distributor Uses

type Distributor interface {
    SetSnapshot(name string, snapshot sn.Snapshot)

    ClearSnapshot(name string)
}

Distributor interface allows processor to distribute snapshots of configuration.

type InMemoryDistributor Uses

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

InMemoryDistributor is an in-memory distributor implementation.

func NewInMemoryDistributor Uses

func NewInMemoryDistributor() *InMemoryDistributor

NewInMemoryDistributor returns a new instance of InMemoryDistributor

func (*InMemoryDistributor) ClearSnapshot Uses

func (d *InMemoryDistributor) ClearSnapshot(name string)

ClearSnapshot is an implementation of Distributor.ClearSnapshot

func (*InMemoryDistributor) GetSnapshot Uses

func (d *InMemoryDistributor) GetSnapshot(name string) sn.Snapshot

GetSnapshot get the snapshot of the specified name

func (*InMemoryDistributor) ListenChanges Uses

func (d *InMemoryDistributor) ListenChanges(cancel chan bool, fn ListenerFn)

ListenChanges registered listener and start listening snapshot changes in the distributor

func (*InMemoryDistributor) NumSnapshots Uses

func (d *InMemoryDistributor) NumSnapshots() int

NumSnapshots returns the current number of snapshots.

func (*InMemoryDistributor) SetSnapshot Uses

func (d *InMemoryDistributor) SetSnapshot(name string, snapshot sn.Snapshot)

SetSnapshot is an implementation of Distributor.SetSnapshot

type InMemorySource Uses

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

InMemorySource is an implementation of source.Interface.

func NewInMemorySource Uses

func NewInMemorySource() *InMemorySource

NewInMemorySource returns a new instance of InMemorySource.

func (*InMemorySource) Delete Uses

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

Delete a value in the in-memory store.

func (*InMemorySource) Get Uses

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

Get a value in the in-memory store.

func (*InMemorySource) Set Uses

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

Set the value in the in-memory store.

func (*InMemorySource) Start Uses

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

Start implements source.Interface.Start

func (*InMemorySource) Stop Uses

func (s *InMemorySource) Stop()

Stop implements source.Interface.Stop

type ListenerFn Uses

type ListenerFn func(s sn.Snapshot)

ListenerFn is used by listeners for defining listen action

type Processor Uses

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 Uses

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

NewProcessor returns a new instance of a Processor

func (*Processor) AwaitFullSync Uses

func (p *Processor) AwaitFullSync(timeout time.Duration) error

AwaitFullSync waits until the full sync event is received from the source. For testing purposes only.

func (*Processor) Start Uses

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 Uses

func (p *Processor) Stop()

Stop the processor.

type Source Uses

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 Uses

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

State is the in-memory state of Galley.

func (*State) Handle Uses

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

Handle implements the processing.Handler interface.

func (*State) String Uses

func (s *State) String() string

String implements fmt.Stringer

Directories

PathSynopsis
conversions
log
processing
projections/serviceentry
projections/serviceentry/converter
projections/serviceentry/pod
publish
resourcePackage resource contains core abstract types for representing configuration resources.

Package runtime imports 24 packages (graph) and is imported by 6 packages. Updated 2019-10-03. Refresh now. Tools for package owners.