provider

package
v0.7.0-pre2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 11 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 ProviderManager

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

func InitProviderEndpoints

func InitProviderEndpoints(pool *pgxpool.Pool) (*ProviderManager, error)

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