Documentation
¶
Index ¶
- Constants
- type Core
- func (c *Core) CreateNodeBinding(ctx context.Context, m *Model) error
- func (c *Core) DeleteNodeBinding(ctx context.Context, key string, m *Model) error
- func (c *Core) Exists(ctx context.Context, key string) (bool, error)
- func (c *Core) List(ctx context.Context, prefix string) ([]*Model, error)
- func (c *Core) ListKeys(ctx context.Context, prefix string) ([]string, error)
- func (c *Core) TriggerNodeBindingRefresh(ctx context.Context) error
- type ICore
- type IRepo
- type Model
- type Repo
Constants ¶
View Source
const (
// Prefix for all node keys in the registry
Prefix = "nodebinding/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core implements all business logic for nodebinding
func (*Core) CreateNodeBinding ¶
CreateNodeBinding creates a new nodebinding
func (*Core) DeleteNodeBinding ¶
DeleteNodeBinding deletes a nodebinding and all resources in it
type ICore ¶
type ICore interface { CreateNodeBinding(ctx context.Context, m *Model) error Exists(ctx context.Context, key string) (bool, error) DeleteNodeBinding(ctx context.Context, key string, m *Model) error ListKeys(ctx context.Context, prefix string) ([]string, error) List(ctx context.Context, prefix string) ([]*Model, error) TriggerNodeBindingRefresh(ctx context.Context) error }
ICore is an interface over nodebinding core
type IRepo ¶
type IRepo interface { common.IRepo List(ctx context.Context, prefix string) ([]common.IModel, error) }
IRepo interface over database repository
type Model ¶
type Model struct { common.BaseModel ID string `json:"id"` NodeID string `json:"node_id"` SubscriptionID string `json:"subscription_id"` SubscriptionVersion string `json:"subscription_version"` Partition int `json:"partition"` }
Model for a node
func (*Model) DefunctKey ¶
DefunctKey returns the key without the partition identifier
Click to show internal directories.
Click to hide internal directories.