Documentation
¶
Overview ¶
Package edgeclient is the bounded client for Snagline's local edge API. It intentionally has no SQLite, SSP, PostgreSQL, NATS, or Buzz access.
Index ¶
- type AckRequest
- type AdviceView
- type CaseRecord
- type CaseSubmission
- type ClaimRequest
- type Client
- func (c *Client) Ack(ctx context.Context, request AckRequest) (DeliveryOutcome, error)
- func (c *Client) Claim(ctx context.Context, request ClaimRequest) ([]Delivery, error)
- func (c *Client) CloseIdleConnections()
- func (c *Client) GetCase(ctx context.Context, caseID string) (CaseRecord, error)
- func (c *Client) ListAdvice(ctx context.Context, caseID string) ([]AdviceView, error)
- func (c *Client) OpenCase(ctx context.Context, request OpenCaseRequest) (CaseSubmission, error)
- func (c *Client) RetryCase(ctx context.Context, caseID string) (CaseSubmission, error)
- type CommitReceipt
- type Config
- type Delivery
- type DeliveryOutcome
- type Front
- type OpenCaseRequest
- type RegistryCoordinates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckRequest ¶
type AdviceView ¶ added in v0.1.2
type CaseRecord ¶ added in v0.1.2
type CaseRecord struct {
EnvelopeID string
CaseID string
Commitment string
Summary string
Registry RegistryCoordinates
ExpiresAt time.Time
Committed bool
}
CaseRecord mirrors GET /v1/cases/{id}. AdviceView mirrors one advice from GET /v1/cases/{id}/advice. Both carry the server's default JSON field names.
type CaseSubmission ¶ added in v0.1.2
type CaseSubmission struct {
EnvelopeID string
CaseID string
Commitment string
AcceptedRemote bool
Receipt CommitReceipt
}
type ClaimRequest ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Ack ¶
func (c *Client) Ack(ctx context.Context, request AckRequest) (DeliveryOutcome, error)
func (*Client) CloseIdleConnections ¶
func (c *Client) CloseIdleConnections()
func (*Client) ListAdvice ¶ added in v0.1.2
ListAdvice lists the advice recorded for a case. A case receives at most one final advice, and may receive none, so an empty list is a valid answer.
func (*Client) OpenCase ¶ added in v0.1.2
func (c *Client) OpenCase(ctx context.Context, request OpenCaseRequest) (CaseSubmission, error)
OpenCase submits a new case. The edge accepts it with 202; anything else is an error. The caller supplies registry coordinates from deployment configuration.
type CommitReceipt ¶ added in v0.1.2
CommitReceipt and CaseSubmission mirror the edge's 202 response for an accepted case. Field names match the server's default JSON marshaling.
type DeliveryOutcome ¶
type DeliveryOutcome string
const ( DeliveryRecorded DeliveryOutcome = "recorded" DeliveryDuplicate DeliveryOutcome = "duplicate" )
type OpenCaseRequest ¶ added in v0.1.2
type OpenCaseRequest struct {
CaseID string
Domain string
Summary string
PublicSummary string
ContextManifest string
Registry RegistryCoordinates
}
OpenCaseRequest is the bounded input for opening a case. PublicSummary is the only field projected to Buzz; Summary stays confidential to the fabric.
type RegistryCoordinates ¶ added in v0.1.2
type RegistryCoordinates struct {
RoutingEpoch int64 `json:"routing_epoch"`
Revision int64 `json:"revision"`
Hash string `json:"hash"`
}
RegistryCoordinates bind a case to a specific registry generation. They are deployment-owned inputs: the edge exposes no route to discover them, so a caller must receive them from trusted deployment configuration.