FailoverProxy class

Handles the networking to Chronik Endpoints, including cycling through both types of endpoints.

Constructors

FailoverProxy(List<String> urls)

Properties

endpointArray List<Endpoint>
For unit test verification
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
workingEndpoint Endpoint
Get the currently working endpoint
no setter

Methods

close() → void
Close the HTTP client
connectWs(WsEndpoint wsEndpoint) Future<void>
Iterates through available websocket urls and attempts connection. Upon a successful connection it handles the various websocket callbacks. Upon an unsuccessful connection it iterates to the next websocket url in the array.
deriveEndpointIndex(int loopIndex) int
Derives the endpoint array index based on _workingIndex This is set to public for unit testing purposes
get(String path) Future<List<int>>
Make an HTTP GET request with failover support
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String path, Uint8List data) Future<List<int>>
Make an HTTP POST request with failover support
setWorkingIndex(int newIndex) → void
Overriding working index for unit testing purposes
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited