Documentation
¶
Overview ¶
Package cloudevents provides helpers for creating CloudEvents HTTP clients and targets that are instrumented with httpmetrics middleware.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientHTTP ¶
Example ¶
package main
import (
"github.com/chainguard-dev/terraform-infra-common/pkg/httpmetrics/cloudevents"
)
func main() {
c, err := cloudevents.NewClientHTTP("my-client")
if err != nil {
panic(err)
}
_ = c
}
Output:
func WithTarget ¶
WithTarget wraps cloudevents.WithTarget to authenticate requests with an identity token when the target is an HTTPS URL.
Example ¶
package main
import (
"context"
"github.com/chainguard-dev/terraform-infra-common/pkg/httpmetrics/cloudevents"
)
func main() {
ctx := context.Background()
opts := cloudevents.WithTarget(ctx, "http://localhost:8080")
_ = opts
}
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.