Documentation
¶
Overview ¶
Package client provides an HTTP client for the TxProxy service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client for interacting with TxProxy over the MarbleRun mesh.
func (*Client) Invoke ¶
func (c *Client) Invoke(ctx context.Context, req *txproxytypes.InvokeRequest) (*txproxytypes.InvokeResponse, error)
Invoke calls TxProxy /invoke.
type Config ¶
type Config struct {
BaseURL string
// ServiceID identifies the caller. In strict identity mode this is redundant
// (caller identity is enforced by MarbleRun mTLS), but it is still useful for
// local development and debugging.
ServiceID string
Timeout time.Duration
// HTTPClient optionally overrides the client used to execute requests.
// For MarbleRun mesh calls, prefer using `marble.Marble.HTTPClient()` so
// requests are sent over verified mTLS.
HTTPClient *http.Client
// MaxBodyBytes caps responses to prevent memory exhaustion.
MaxBodyBytes int64
}
Config holds client configuration.
Click to show internal directories.
Click to hide internal directories.