Documentation
¶
Index ¶
- Constants
- func PullOnce(ctx context.Context, c *Client, repo federation.Repository, ...) (*federation.RegionExport, error)
- func RunPullLoop(ctx context.Context, c *Client, repo federation.Repository, ...)
- type Client
- func (c *Client) Export(ctx context.Context, regionSlug string, since int64) (*federation.RegionExport, error)
- func (c *Client) Join(ctx context.Context) (*federation.ControlPlanePeer, error)
- func (c *Client) UsageReports(ctx context.Context, orgID string, since, until *time.Time, limit int) (*UsageReportsResponse, error)
- type UsageReportsResponse
Constants ¶
View Source
const TokenHeader = "X-AFI-Federation-Token"
Variables ¶
This section is empty.
Functions ¶
func PullOnce ¶
func PullOnce(ctx context.Context, c *Client, repo federation.Repository, target federation.ApplyTarget, regionSlug string) (*federation.RegionExport, error)
PullOnce joins (best-effort), loads cursor, exports, and applies.
func RunPullLoop ¶
func RunPullLoop(ctx context.Context, c *Client, repo federation.Repository, target federation.ApplyTarget, regionSlug string, interval time.Duration, onErr func(error))
RunPullLoop polls the hub until ctx is cancelled.
Types ¶
type Client ¶
Client pulls region exports from a home control plane.
func (*Client) Export ¶
func (c *Client) Export(ctx context.Context, regionSlug string, since int64) (*federation.RegionExport, error)
Export pulls a region export document (optionally since a revision).
func (*Client) Join ¶
func (c *Client) Join(ctx context.Context) (*federation.ControlPlanePeer, error)
Join exchanges the join token for peer identity on the hub.
type UsageReportsResponse ¶
UsageReportsResponse is returned by regional usage report pull.
Click to show internal directories.
Click to hide internal directories.