Documentation ¶
Overview ¶
Package zero contains the pomerium zero configuration API client
Index ¶
- type API
- func (api *API) Connect(ctx context.Context, opts ...fanout.Option) error
- func (api *API) DownloadClusterResourceBundle(ctx context.Context, dst io.Writer, id string, current *DownloadConditional) (*DownloadResult, error)
- func (api *API) GetClusterBootstrapConfig(ctx context.Context) (*cluster_api.BootstrapConfig, error)
- func (api *API) GetClusterResourceBundles(ctx context.Context) (*cluster_api.GetBundlesResponse, error)
- func (api *API) Report(ctx context.Context, opts ...reporter.Option) error
- func (api *API) ReportBundleAppliedFailure(ctx context.Context, bundleID string, ...) error
- func (api *API) ReportBundleAppliedSuccess(ctx context.Context, bundleID string, metadata map[string]string) error
- func (api *API) Watch(ctx context.Context, opts ...WatchOption) error
- type DownloadConditional
- type DownloadResult
- type Option
- type WatchOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is a Pomerium Zero Cluster API client
func (*API) DownloadClusterResourceBundle ¶
func (api *API) DownloadClusterResourceBundle( ctx context.Context, dst io.Writer, id string, current *DownloadConditional, ) (*DownloadResult, error)
DownloadClusterResourceBundle downloads given cluster resource bundle to given writer.
func (*API) GetClusterBootstrapConfig ¶
func (api *API) GetClusterBootstrapConfig(ctx context.Context) (*cluster_api.BootstrapConfig, error)
GetClusterBootstrapConfig fetches the bootstrap configuration from the cluster API
func (*API) GetClusterResourceBundles ¶
func (api *API) GetClusterResourceBundles(ctx context.Context) (*cluster_api.GetBundlesResponse, error)
GetClusterResourceBundles fetches the resource bundles from the cluster API
func (*API) ReportBundleAppliedFailure ¶
func (api *API) ReportBundleAppliedFailure( ctx context.Context, bundleID string, source cluster_api.BundleStatusFailureSource, err error, ) error
ReportBundleAppliedFailure reports a failed bundle application
type DownloadConditional ¶
DownloadConditional contains the conditional headers for a download operation
func (*DownloadConditional) SetHeaders ¶
func (c *DownloadConditional) SetHeaders(req *http.Request) error
SetHeaders sets the conditional headers on the given request
func (*DownloadConditional) Validate ¶
func (c *DownloadConditional) Validate() error
Validate validates the conditional headers
type DownloadResult ¶
type DownloadResult struct { // NotModified is true if the bundle has not been modified NotModified bool // DownloadConditional contains the new conditional *DownloadConditional // Metadata contains the metadata of the downloaded bundle Metadata map[string]string }
DownloadResult contains the result of a download operation
type Option ¶
type Option func(*config)
Option is a functional option for the SDK
func WithClusterAPIEndpoint ¶
WithClusterAPIEndpoint sets the cluster API endpoint
func WithConnectAPIEndpoint ¶
WithConnectAPIEndpoint sets the connect API endpoint
func WithDownloadURLCacheTTL ¶
WithDownloadURLCacheTTL sets the minimum TTL for download URL cache entries
func WithHTTPClient ¶
WithHTTPClient sets the HTTP client
func WithOTELEndpoint ¶
WithOTELEndpoint sets the OTEL API endpoint
type WatchOption ¶
type WatchOption = connect_mux.WatchOption
WatchOption defines which events to watch for