Documentation ¶
Index ¶
- Variables
- func NewCeForwardClient(opts ForwardClientOptions) (handlers.CeForwardClient, error)
- func NewCePubSubClient(ctx context.Context, pc *pubsub.Client) (handlers.CePubSubClient, error)
- func NewCeReceiverClient(ctx context.Context, livenessChecker *utils.LivenessChecker, ...) (handlers.CeReceiveClient, error)
- func NewPubSubClient(ctx context.Context, projectID clients.ProjectID) (c *pubsub.Client, err error)
- func NewStorageClient(ctx context.Context) (c *storage.Client, err error)
- type EnvConfig
- type ForwardClientOptions
- type ForwardListener
- type ForwardPort
- type Helper
- type ReceiveClientOptions
- type ReceiveListener
- type ReceivePort
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCeForwardClient ¶
func NewCeForwardClient(opts ForwardClientOptions) (handlers.CeForwardClient, error)
func NewCePubSubClient ¶
func NewCeReceiverClient ¶
func NewCeReceiverClient(ctx context.Context, livenessChecker *utils.LivenessChecker, opts ReceiveClientOptions) (handlers.CeReceiveClient, error)
func NewPubSubClient ¶
Types ¶
type EnvConfig ¶
type EnvConfig struct { // Environment variable containing the maximum tolerated staleness duration for events processed by the forward and receiver clients LivenessStaleDuration time.Duration `envconfig:"LIVENESS_STALE_DURATION" default:"5m"` // Environment variable containing the default timeout duration to wait for an event to be delivered, if no custom timeout is specified DefaultTimeoutDuration time.Duration `envconfig:"DEFAULT_TIMEOUT_DURATION" default:"2m"` // Environment variable containing the maximum timeout duration to wait for an event to be delivered MaxTimeoutDuration time.Duration `envconfig:"MAX_TIMEOUT_DURATION" default:"30m"` }
type ForwardClientOptions ¶
func NewCeForwardClientOptions ¶
func NewCeForwardClientOptions(port ForwardPort) ForwardClientOptions
func NewTestCeForwardClientOptions ¶
func NewTestCeForwardClientOptions(listener ForwardListener) ForwardClientOptions
type ForwardListener ¶
type ForwardPort ¶
type ForwardPort int
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper is the main probe helper object which contains the metadata and clients shared between all probe Handlers.
func InitializeTestProbeHelper ¶
func InitializeTestProbeHelper(ctx context.Context, brokerCellBaseUrl string, projectID clients.ProjectID, schedulerStaleDuration time.Duration, helperEnv EnvConfig, forwardListener ForwardListener, receiveListener ReceiveListener, storageClient *storage.Client, psClient *pubsub.Client) (*Helper, error)
func NewHelper ¶
func NewHelper(env EnvConfig, handler handlers.Interface, ceForwardClient handlers.CeForwardClient, ceReceiveClient handlers.CeReceiveClient, livenessCheker *utils.LivenessChecker) *Helper
func (*Helper) CheckLastEventTimes ¶
CheckLastEventTimes returns an actionFunc which checks the delay between the current time and last processed event times from the forward and receiver clients. This handler is used by the liveness checker to declare the liveness status of the probe helper.
type ReceiveClientOptions ¶
func NewCeReceiverClientOptions ¶
func NewCeReceiverClientOptions(port ReceivePort) ReceiveClientOptions
func NewTestCeReceiverClientOptions ¶
func NewTestCeReceiverClientOptions(listener ReceiveListener) ReceiveClientOptions
type ReceiveListener ¶
type ReceivePort ¶
type ReceivePort int
Click to show internal directories.
Click to hide internal directories.