Documentation
¶
Index ¶
- Constants
- Variables
- func ExponentialBackoff(wait time.Duration) time.Duration
- func HTTPTimeoutsSettings(w http.ResponseWriter, r *http.Request, client *Client)
- func NopBackoff(d time.Duration) time.Duration
- func ParseTimeouts(value string) ([]time.Duration, bool, error)
- type Backoff
- type Client
- func (c *Client) Block(ctx context.Context, blockID string) (*starknet.Block, error)
- func (c *Client) BlockTrace(ctx context.Context, blockHash string) (*starknet.BlockTrace, error)
- func (c *Client) ClassDefinition(ctx context.Context, classHash *felt.Felt) (*starknet.ClassDefinition, error)
- func (c *Client) CompiledClassDefinition(ctx context.Context, classHash *felt.Felt) (*starknet.CompiledClass, error)
- func (c *Client) FeeTokenAddresses(ctx context.Context) (starknet.FeeTokenAddresses, error)
- func (c *Client) PreConfirmedBlock(ctx context.Context, blockNumber string) (*starknet.PreConfirmedBlock, error)
- func (c *Client) PublicKey(ctx context.Context) (*felt.Felt, error)
- func (c *Client) Signature(ctx context.Context, blockID string) (*starknet.Signature, error)
- func (c *Client) StateUpdate(ctx context.Context, blockID string) (*starknet.StateUpdate, error)
- func (c *Client) StateUpdateWithBlock(ctx context.Context, blockID string) (*starknet.StateUpdateWithBlock, error)
- func (c *Client) Transaction(ctx context.Context, transactionHash *felt.Felt) (*starknet.TransactionStatus, error)
- func (c *Client) WithAPIKey(key string) *Client
- func (c *Client) WithBackoff(b Backoff) *Client
- func (c *Client) WithListener(l EventListener) *Client
- func (c *Client) WithLogger(log utils.SimpleLogger) *Client
- func (c *Client) WithMaxRetries(num int) *Client
- func (c *Client) WithMaxWait(d time.Duration) *Client
- func (c *Client) WithMinWait(d time.Duration) *Client
- func (c *Client) WithTimeouts(timeouts []time.Duration, fixed bool) *Client
- func (c *Client) WithUserAgent(ua string) *Client
- type EventListener
- type SelectiveListener
- type Timeouts
Constants ¶
View Source
const (
DefaultTimeouts = "5s"
)
Variables ¶
View Source
var ErrDeprecatedCompiledClass = errors.New("deprecated compiled class")
Functions ¶
func HTTPTimeoutsSettings ¶ added in v0.14.4
func HTTPTimeoutsSettings(w http.ResponseWriter, r *http.Request, client *Client)
func ParseTimeouts ¶ added in v0.14.3
ParseTimeouts parses a comma-separated string of duration values into a slice of time.Duration. Returns: - the parsed timeout values - if a fixed or dynamic timeouts should be used - an error in case the string cannot be parsed
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
NewTestClient returns a client and a function to close a test server.
func (*Client) BlockTrace ¶ added in v0.7.2
func (*Client) ClassDefinition ¶
func (*Client) CompiledClassDefinition ¶ added in v0.3.1
func (*Client) FeeTokenAddresses ¶ added in v0.15.7
func (*Client) PreConfirmedBlock ¶ added in v0.15.0
func (*Client) StateUpdate ¶
func (*Client) StateUpdateWithBlock ¶ added in v0.6.0
func (*Client) Transaction ¶
func (*Client) WithAPIKey ¶ added in v0.9.2
func (*Client) WithBackoff ¶
func (*Client) WithListener ¶ added in v0.8.2
func (c *Client) WithListener(l EventListener) *Client
func (*Client) WithLogger ¶
func (c *Client) WithLogger(log utils.SimpleLogger) *Client
func (*Client) WithMaxRetries ¶
func (*Client) WithTimeouts ¶ added in v0.14.3
func (*Client) WithUserAgent ¶ added in v0.6.0
type EventListener ¶ added in v0.8.2
type SelectiveListener ¶ added in v0.8.2
func (*SelectiveListener) OnResponse ¶ added in v0.8.2
func (l *SelectiveListener) OnResponse(urlPath string, status int, took time.Duration)
type Timeouts ¶ added in v0.14.3
type Timeouts struct {
// contains filtered or unexported fields
}
func (*Timeouts) DecreaseTimeout ¶ added in v0.14.3
func (t *Timeouts) DecreaseTimeout()
func (*Timeouts) GetCurrentTimeout ¶ added in v0.14.3
func (*Timeouts) IncreaseTimeout ¶ added in v0.14.3
func (t *Timeouts) IncreaseTimeout()
Click to show internal directories.
Click to hide internal directories.