controller

package
v0.0.0-...-bb2f907 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerClient

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

ControllerClient implements the Manager It will also be used to maintain some localized state

func NewControllerClient

func NewControllerClient() *ControllerClient

NewControllerClient returns an instance of the ControllerClient which implements the Manager

func (*ControllerClient) CreateController

func (mc *ControllerClient) CreateController(ctx context.Context, m clmModel.Controller, mayExist bool) (clmModel.Controller, error)

CreateController a new collection based on the Controller

func (*ControllerClient) DeleteController

func (mc *ControllerClient) DeleteController(ctx context.Context, name string) error

DeleteController the Controller from database

func (*ControllerClient) GetController

func (mc *ControllerClient) GetController(ctx context.Context, name string) (clmModel.Controller, error)

GetController returns the Controller for corresponding name

func (*ControllerClient) GetControllers

func (mc *ControllerClient) GetControllers(ctx context.Context) ([]clmModel.Controller, error)

GetControllers returns all the Controllers that are registered

func (*ControllerClient) InitControllers

func (mc *ControllerClient) InitControllers(ctx context.Context)

InitControllers initializes connctions for Controllers in the DB

type ControllerManager

type ControllerManager interface {
	CreateController(ctx context.Context, ms clmModel.Controller, mayExist bool) (clmModel.Controller, error)
	GetController(ctx context.Context, name string) (clmModel.Controller, error)
	GetControllers(ctx context.Context) ([]clmModel.Controller, error)
	InitControllers(ctx context.Context)
	DeleteController(ctx context.Context, name string) error
}

ControllerManager is an interface exposes the Controller functionality

Jump to

Keyboard shortcuts

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