Documentation ¶
Index ¶
- type Controller
- func (c *Controller) Apply(change *sink.Change) error
- func (c *Controller) ConfigDescriptor() model.ConfigDescriptor
- func (c *Controller) Create(config model.Config) (revision string, err error)
- func (c *Controller) Delete(typ, name, namespace string) error
- func (c *Controller) Get(typ, name, namespace string) *model.Config
- func (c *Controller) HasSynced() bool
- func (c *Controller) List(typ, namespace string) (out []model.Config, err error)
- func (c *Controller) RegisterEventHandler(typ string, handler func(model.Config, model.Event))
- func (c *Controller) Run(stop <-chan struct{})
- func (c *Controller) Update(config model.Config) (newRevision string, err error)
- type CoreDataModel
- type Options
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 ¶
RegisterEventHandler registers a handler using the type as a key
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