Documentation
¶
Overview ¶
SPDX-FileCopyrightText: 2022 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func NewAddWRPEventStreamHandler(s Service, config HandlerConfig) http.Handler
- func NewGetAllWRPEventStreamsHandler(s Service, config HandlerConfig) http.Handler
- func NewService(client chrysom.PushReader) *service
- type Config
- type DefaultListenerOut
- type DefaultListenersIn
- type HandlerConfig
- type ListenerIn
- type ListenerOut
- type Service
- type ServiceIn
- type Watch
- type WatchFunc
Constants ¶
This section is empty.
Variables ¶
var (
DefaultBasicPartnerIDsHeader = "X-Xmidt-Partner-Ids"
)
Functions ¶
func NewAddWRPEventStreamHandler ¶ added in v0.4.0
func NewAddWRPEventStreamHandler(s Service, config HandlerConfig) http.Handler
NewAddWRPEventStreamHandler returns an HTTP handler for adding a wrpEventStream registration.
func NewGetAllWRPEventStreamsHandler ¶ added in v0.4.0
func NewGetAllWRPEventStreamsHandler(s Service, config HandlerConfig) http.Handler
NewGetAllWRPEventStreamsHandler returns an HTTP handler for fetching all the currently registered wrpEventStreams.
func NewService ¶ added in v0.3.10
func NewService(client chrysom.PushReader) *service
NewService returns an ancla client used to interact with an Argus database.
Types ¶
type Config ¶
type Config struct {
// DisablePartnerIDs, if true, will allow wrpEventStreams to register without
// checking the validity of the partnerIDs in the request.
DisablePartnerIDs bool
// Validation provides options for validating the wrpEventStream's URL and TTL
// related fields. Some validation happens regardless of the configuration:
// URLs must be a valid URL structure, the Matcher.DeviceID values must
// compile into regular expressions, and the Events field must have at
// least one value and all values must compile into regular expressions.
Validation schema.SchemaURLValidatorConfig
}
Config contains information needed to initialize the Argus database client.
type DefaultListenerOut ¶ added in v0.4.0
func ProvideDefaultListenerWatchers ¶ added in v0.4.0
func ProvideDefaultListenerWatchers(in DefaultListenersIn) DefaultListenerOut
type DefaultListenersIn ¶ added in v0.4.0
type DefaultListenersIn struct {
fx.In
// Metric for wrpEventStream list size, used by the wrpEventStream list size watcher listener.
WRPEventStreamListSizeGauge prometheus.Gauge `name:"wrp_event_stream_list_size"`
}
TODO: Refactor and move Watch and ListenerInterface related code to chrysom.
type HandlerConfig ¶ added in v0.1.1
type HandlerConfig struct {
V webhook.Validators
DisablePartnerIDs bool
GetLogger func(context.Context) *zap.Logger
}
HandlerConfig contains configuration for all components that handlers depend on from the service to the transport layers.
type ListenerIn ¶ added in v0.4.0
type ListenerIn struct {
fx.In
Shutdowner fx.Shutdowner
// Watchers are called by the Listener when new wrpEventStreams are fetched.
Watchers []Watch `group:"watchers"`
}
type ListenerOut ¶ added in v0.4.0
type ListenerOut struct {
fx.Out
Option chrysom.ListenerOption `group:"listener_options"`
}
ListenerOut contains options data for Listener client's reader.
func ProvideListener ¶ added in v0.4.0
func ProvideListener(in ListenerIn) ListenerOut
type Service ¶
type Service interface {
// Add adds the given owned wrpEventStream to the current list of wrpEventStreams. If the operation
// succeeds, a non-nil error is returned.
Add(ctx context.Context, owner string, iw schema.Manifest) error
// GetAll lists all the current registered wrpEventStreams.
GetAll(ctx context.Context) ([]schema.Manifest, error)
}
Service describes the core operations around wrpEventStream subscriptions.
func ProvideService ¶ added in v0.4.0
ProvideService provides the Argus client service from the given configuration.
type ServiceIn ¶ added in v0.4.0
type ServiceIn struct {
fx.In
// PushReader is the user provided db client.
PushReader chrysom.PushReader `optional:"true"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
SPDX-FileCopyrightText: 2025 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
|
SPDX-FileCopyrightText: 2025 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0 |
|
SPDX-FileCopyrightText: 2025 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
|
SPDX-FileCopyrightText: 2025 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0 |