Documentation
¶
Index ¶
- func GetDefaultOrg(ctx context.Context, client graphql2.Client) (*graphql.OrgsQueryOrganizationsOrganizationConnectionNodesOrganization, error)
- func HandleGraphqlErrors(diagnostics *diag.Diagnostics, err error, format string, formatArgs ...any)
- func P[T any](x T) *T
- func Retry(ctx context.Context, totalTime time.Duration, period time.Duration, ...) error
- type GraphqlTransport
- type LoggingHttpTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultOrg ¶
func HandleGraphqlErrors ¶
func HandleGraphqlErrors(diagnostics *diag.Diagnostics, err error, format string, formatArgs ...any)
func Retry ¶ added in v0.1.18
func Retry(ctx context.Context, totalTime time.Duration, period time.Duration, handler func() (temporaryErr error, finalErr error)) error
Retry runs the function repeatedly until it succeeds, it fails with `finalErr`, or until the specified total duration elapses. Between each run it sleeps for the `period` time. It returns the last error upon failure, and logs all errors as it runs at `DEBUG` level.
Types ¶
type GraphqlTransport ¶
type GraphqlTransport struct { Inner http.RoundTripper Token string EnableDebugTrace bool }
type LoggingHttpTransport ¶ added in v0.1.13
type LoggingHttpTransport struct {
Inner http.RoundTripper
}
Click to show internal directories.
Click to hide internal directories.