provider

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagerCmdType

type ManagerCmdType int
const (
	Register ManagerCmdType = 1
	Removed  ManagerCmdType = 2
)

type ManagerCommand

type ManagerCommand struct {
	Type ManagerCmdType `json:"type"`
}

type NewProviderPayload

type NewProviderPayload struct {
	EventKey  string              `json:"eventKey"`
	Manifests model.Manifests     `json:"manifests"`
	Info      model.EventDataInfo `json:"info"`
}

type Option added in v0.11.0

type Option func(*ProviderManager)

func WithConfig added in v0.11.0

func WithConfig(cfg config.Config) Option

func WithPersistence added in v0.11.0

func WithPersistence(db *pgxpool.Pool) Option

func WithWampClient added in v0.11.0

func WithWampClient(wampClient *client.Client) Option

type ProviderManager

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

func NewProviderManager added in v0.11.0

func NewProviderManager(opts ...Option) (*ProviderManager, error)

func (*ProviderManager) ProviderLookupFunc added in v0.9.0

func (pm *ProviderManager) ProviderLookupFunc(key string) *service.ProviderData

func (*ProviderManager) Shutdown

func (pm *ProviderManager) Shutdown()

type ProviderResponseData

type ProviderResponseData struct {
	EventKey   string              `json:"eventKey"`
	Manifests  model.Manifests     `json:"manifests"`
	Info       model.EventDataInfo `json:"info"`
	RecordDate time.Time           `json:"recordDate"`
	DbId       int                 `json:"dbId"`
}

contains the data sent to the client when using provider endpoints

type PublishNew

type PublishNew struct {
	Type    ManagerCmdType     `json:"type"`
	Payload NewProviderPayload `json:"payload"`
}

type PublishRemoved

type PublishRemoved struct {
	Type    ManagerCmdType `json:"type"`
	Payload string         `json:"payload"` // contains the event key
}

Jump to

Keyboard shortcuts

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