coredatamodel

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a temporary storage for the changes received via MCP server

func (*Controller) Apply

func (c *Controller) Apply(change *sink.Change) error

Apply receives changes from MCP server and creates the corresponding config

func (*Controller) ConfigDescriptor

func (c *Controller) ConfigDescriptor() model.ConfigDescriptor

ConfigDescriptor returns all the ConfigDescriptors that this controller is responsible for

func (*Controller) Create

func (c *Controller) Create(config model.Config) (revision string, err error)

Create is not implemented

func (*Controller) Delete

func (c *Controller) Delete(typ, name, namespace string) error

Delete is not implemented

func (*Controller) Get

func (c *Controller) Get(typ, name, namespace string) *model.Config

Get is not implemented

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

HasSynced returns true if the first batch of items has been popped

func (*Controller) List

func (c *Controller) List(typ, namespace string) (out []model.Config, err error)

List returns all the config that is stored by type and namespace if namespace is empty string it returns config for all the namespaces

func (*Controller) RegisterEventHandler

func (c *Controller) RegisterEventHandler(typ string, handler func(model.Config, model.Event))

RegisterEventHandler registers a handler using the type as a key

func (*Controller) Run

func (c *Controller) Run(stop <-chan struct{})

Run is not implemented

func (*Controller) Update

func (c *Controller) Update(config model.Config) (newRevision string, err error)

Update is not implemented

type CoreDataModel

type CoreDataModel interface {
	model.ConfigStoreCache
	sink.Updater
}

CoreDataModel is a combined interface for ConfigStoreCache MCP Updater and ServiceDiscovery

func NewController

func NewController(options Options) CoreDataModel

NewController provides a new CoreDataModel controller

type Options

type Options struct {
	DomainSuffix              string
	ClearDiscoveryServerCache func()
}

Options stores the configurable attributes of a Control

Jump to

Keyboard shortcuts

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