Documentation ¶
Index ¶
- Constants
- Variables
- func NewLivenessChecker(probe *CloudSchedulerSourceProbe) *utils.LivenessChecker
- type BrokerE2EDeliveryProbe
- type CeForwardClient
- type CePubSubClient
- type CeReceiveClient
- type CloudAuditLogsSourceProbe
- type CloudPubSubSourceProbe
- type CloudSchedulerSourceProbe
- type CloudStorageSourceArchiveProbe
- type CloudStorageSourceCreateProbe
- type CloudStorageSourceDeleteProbe
- type CloudStorageSourceProbe
- type CloudStorageSourceUpdateMetadataProbe
- type EventTypeProbe
- type Interface
Constants ¶
const ( // CloudStorageSourceCreateProbeEventType is the CloudEvent type of forward // CloudStorageSource create probes. CloudStorageSourceCreateProbeEventType = "cloudstoragesource-probe-create" // CloudStorageSourceUpdateMetadataProbeEventType is the CloudEvent type of forward // CloudStorageSource update-metadata probes. CloudStorageSourceUpdateMetadataProbeEventType = "cloudstoragesource-probe-update-metadata" // CloudStorageSourceArchiveProbeEventType is the CloudEvent type of forward // CloudStorageSource archive probes. CloudStorageSourceArchiveProbeEventType = "cloudstoragesource-probe-archive" // CloudStorageSourceDeleteProbeEventType is the CloudEvent type of forward // CloudStorageSource delete probes. CloudStorageSourceDeleteProbeEventType = "cloudstoragesource-probe-delete" )
const ( // BrokerE2EDeliveryProbeEventType is the CloudEvent type of broker e2e // delivery probes. BrokerE2EDeliveryProbeEventType = "broker-e2e-delivery-probe" )
const ( // CloudAuditLogsSourceProbeEventType is the CloudEvent type of forward // CloudAuditLogsSource probes. CloudAuditLogsSourceProbeEventType = "cloudauditlogssource-probe" )
const ( // CloudPubSubSourceProbeEventType is the CloudEvent type of forward // CloudPubSubSource probes. CloudPubSubSourceProbeEventType = "cloudpubsubsource-probe" )
const ( // CloudSchedulerSourceProbeEventType is the CloudEvent type of forward // CloudSchedulerSource probes. CloudSchedulerSourceProbeEventType = "cloudschedulersource-probe" )
Variables ¶
var HandlerSet wire.ProviderSet = wire.NewSet( wire.Bind(new(Interface), new(*EventTypeProbe)), NewEventTypeHandler, utils.NewSyncReceivedEvents, NewBrokerE2EDeliveryProbe, NewCloudAuditLogsSourceProbe, NewCloudPubSubSourceProbe, NewCloudSchedulerSourceProbe, NewCloudStorageSourceProbe, wire.Struct(new(CloudStorageSourceCreateProbe), "*"), wire.Struct(new(CloudStorageSourceDeleteProbe), "*"), wire.Struct(new(CloudStorageSourceArchiveProbe), "*"), wire.Struct(new(CloudStorageSourceUpdateMetadataProbe), "*"), NewLivenessChecker, )
Functions ¶
func NewLivenessChecker ¶
func NewLivenessChecker(probe *CloudSchedulerSourceProbe) *utils.LivenessChecker
Types ¶
type BrokerE2EDeliveryProbe ¶
type BrokerE2EDeliveryProbe struct {
// contains filtered or unexported fields
}
BrokerE2EDeliveryProbe is the probe handler for probe requests in the broker e2e delivery probe.
func NewBrokerE2EDeliveryProbe ¶
func NewBrokerE2EDeliveryProbe(brokerCellIngressBaseURL string, client CeForwardClient) *BrokerE2EDeliveryProbe
func (*BrokerE2EDeliveryProbe) Forward ¶
func (p *BrokerE2EDeliveryProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward sends an event to a given broker in a given namespace.
func (*BrokerE2EDeliveryProbe) Receive ¶
func (p *BrokerE2EDeliveryProbe) Receive(ctx context.Context, event cloudevents.Event) error
Receive closes the receiver channel associated with a particular event.
type CeForwardClient ¶
type CeForwardClient cloudevents.Client
type CePubSubClient ¶
type CePubSubClient cloudevents.Client
type CeReceiveClient ¶
type CeReceiveClient cloudevents.Client
type CloudAuditLogsSourceProbe ¶
type CloudAuditLogsSourceProbe struct {
// contains filtered or unexported fields
}
CloudAuditLogsSourceProbe is the probe handler for probe requests in the CloudAuditLogsSource probe.
func NewCloudAuditLogsSourceProbe ¶
func NewCloudAuditLogsSourceProbe(projectID clients.ProjectID, pubsubClient *pubsub.Client) *CloudAuditLogsSourceProbe
func (*CloudAuditLogsSourceProbe) Forward ¶
func (p *CloudAuditLogsSourceProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward publishes creates a Pub/Sub topic in order to generate a Cloud Audit Logs notification event.
func (*CloudAuditLogsSourceProbe) Receive ¶
func (p *CloudAuditLogsSourceProbe) Receive(ctx context.Context, event cloudevents.Event) error
Receive closes the receiver channel associated with a Cloud Audit Logs notification event.
type CloudPubSubSourceProbe ¶
type CloudPubSubSourceProbe struct {
// contains filtered or unexported fields
}
CloudPubSubSourceProbe is the probe handler for probe requests in the CloudPubSubSource probe.
func NewCloudPubSubSourceProbe ¶
func NewCloudPubSubSourceProbe(cePubsubClient CePubSubClient) *CloudPubSubSourceProbe
func (*CloudPubSubSourceProbe) Forward ¶
func (p *CloudPubSubSourceProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward publishes to Pub/Sub in order to generate a notification event.
func (*CloudPubSubSourceProbe) Receive ¶
func (p *CloudPubSubSourceProbe) Receive(ctx context.Context, event cloudevents.Event) error
Receive closes the receiver channel associated with a Pub/Sub notification event.
type CloudSchedulerSourceProbe ¶
type CloudSchedulerSourceProbe struct { // The map of times of observed ticks in the CloudSchedulerSource probe EventTimes utils.SyncTimesMap // StaleDuration is the duration after which entries in the EventTimes map are // considered stale and should be cleaned up in the liveness probe. StaleDuration time.Duration }
CloudSchedulerSourceProbe is the probe handler for probe requests in the CloudSchedulerSource probe.
func NewCloudSchedulerSourceProbe ¶
func NewCloudSchedulerSourceProbe(staleDuration time.Duration) *CloudSchedulerSourceProbe
func (*CloudSchedulerSourceProbe) CleanupStaleSchedulerTimes ¶
func (p *CloudSchedulerSourceProbe) CleanupStaleSchedulerTimes() utils.ActionFunc
CleanupStaleSchedulerTimes returns a handler which loops through each scheduler event time and clears the stale entries from the EventTimes map.
func (*CloudSchedulerSourceProbe) Forward ¶
func (p *CloudSchedulerSourceProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward tests the delay between the current time and the latest recorded Cloud Scheduler tick in a given scope.
func (*CloudSchedulerSourceProbe) Receive ¶
func (p *CloudSchedulerSourceProbe) Receive(ctx context.Context, event cloudevents.Event) error
Receive refreshes the latest timestamp for a Cloud Scheduler tick in a given scope.
type CloudStorageSourceArchiveProbe ¶
type CloudStorageSourceArchiveProbe struct {
*CloudStorageSourceProbe
}
CloudStorageSourceArchiveProbe is the probe handler for probe requests in the CloudStorageSource archive probe.
func (*CloudStorageSourceArchiveProbe) Forward ¶
func (p *CloudStorageSourceArchiveProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward archives a Cloud Storage object in order to generate a notification event.
type CloudStorageSourceCreateProbe ¶
type CloudStorageSourceCreateProbe struct {
*CloudStorageSourceProbe
}
CloudStorageSourceCreateProbe is the probe handler for probe requests in the CloudStorageSource create probe.
func (*CloudStorageSourceCreateProbe) Forward ¶
func (p *CloudStorageSourceCreateProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward writes an object to Cloud Storage in order to generate a notification event.
type CloudStorageSourceDeleteProbe ¶
type CloudStorageSourceDeleteProbe struct {
*CloudStorageSourceProbe
}
CloudStorageSourceDeleteProbe is the probe handler for probe requests in the CloudStorageSource delete probe.
func (*CloudStorageSourceDeleteProbe) Forward ¶
func (p *CloudStorageSourceDeleteProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward deletes a Cloud Storage object in order to generate a notification event.
type CloudStorageSourceProbe ¶
type CloudStorageSourceProbe struct {
// contains filtered or unexported fields
}
CloudStorageSourceProbe is the base probe type for probe requests in the CloudStorageSource probes. Since all of the CloudStorageSource probes share the same Receive logic, they all inherit it from this object.
func NewCloudStorageSourceProbe ¶
func NewCloudStorageSourceProbe(storageClient *storage.Client) *CloudStorageSourceProbe
func (*CloudStorageSourceProbe) Receive ¶
func (p *CloudStorageSourceProbe) Receive(ctx context.Context, event cloudevents.Event) error
Receive closes the receiver channel associated with the Cloud Storage notification event.
type CloudStorageSourceUpdateMetadataProbe ¶
type CloudStorageSourceUpdateMetadataProbe struct {
*CloudStorageSourceProbe
}
CloudStorageSourceUpdateMetadataProbe is the probe handler for probe requests in the CloudStorageSource update-metadata probe.
func (*CloudStorageSourceUpdateMetadataProbe) Forward ¶
func (p *CloudStorageSourceUpdateMetadataProbe) Forward(ctx context.Context, event cloudevents.Event) error
Forward modifies a Cloud Storage object's metadata in order to generate a notification event.
type EventTypeProbe ¶
type EventTypeProbe struct {
// contains filtered or unexported fields
}
EventTypeProbe is a handler that maps an event types to its corresponding underlying handler.
func NewEventTypeHandler ¶
func NewEventTypeHandler(brokerE2EDeliveryProbe *BrokerE2EDeliveryProbe, cloudPubSubSourceProbe *CloudPubSubSourceProbe, cloudStorageSourceCreateProbe *CloudStorageSourceCreateProbe, cloudStorageSourceUpdateMetadataProbe *CloudStorageSourceUpdateMetadataProbe, cloudStorageSourceArchiveProbe *CloudStorageSourceArchiveProbe, cloudStorageSourceDeleteProbe *CloudStorageSourceDeleteProbe, cloudAuditLogsSourceProbe *CloudAuditLogsSourceProbe, cloudSchedulerSourceProbe *CloudSchedulerSourceProbe) *EventTypeProbe
func (*EventTypeProbe) Forward ¶
func (p *EventTypeProbe) Forward(ctx context.Context, event cloudevents.Event) error
func (*EventTypeProbe) Receive ¶
func (p *EventTypeProbe) Receive(ctx context.Context, event cloudevents.Event) error
type Interface ¶
type Interface interface { // Forward is the handler function which is called for probe requests which come // from PROBE_PORT. Forward(context.Context, cloudevents.Event) error // Receive is the handler function which is called for probe requests which come // from RECEIVER_PORT. Receive(context.Context, cloudevents.Event) error }
Interface is the interface which static probe objects should implement.