manager_bindings

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//todo %v %v %v --> user deviceGuid bindingName
	BindingsSavePathPrefixFormat           = "/spongeregister/superbahnManager/binding/%v/%v/%v"
	ListBindingsSavePathPrefixFormat       = "/spongeregister/superbahnManager/binding/%v/"
	BindingsandClusterSavePathPrefixFormat = "/spongeregister/superbahnManager/binding/%v/%v/%v%v"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BindingsManager

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

func NewBindingsManager

func NewBindingsManager(ctx context.Context, d BindingsRecorder, user, userToken string) *BindingsManager

func (*BindingsManager) CreateBinding

func (r *BindingsManager) CreateBinding(bindingName, masterLevel, slaveLevel, masterGuid, slaveGuid, version string) error

func (*BindingsManager) DeleteBinding

func (r *BindingsManager) DeleteBinding(slaveGuid, bindingName string) error

func (*BindingsManager) GetDevicesBindings

func (r *BindingsManager) GetDevicesBindings(slaveGuid string) map[string]*bindings.Binding

func (*BindingsManager) GetDevicesMasterLevel

func (r *BindingsManager) GetDevicesMasterLevel(slaveGuid string) map[string]string

func (*BindingsManager) ListBindings

func (r *BindingsManager) ListBindings() []*bindings.Binding

type BindingsRecorder

type BindingsRecorder interface {
	Put(string, string) error
	Get(string) ([]byte, error)
	GetWithPrefix(string) (map[string][]byte, error)
	Del(string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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