Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRepeatedSessionKey = errors.New("repeated session key")
)
Functions ¶
This section is empty.
Types ¶
type ErrorSource ¶ added in v1.5.0
type ErrorSource string
const ( ErrorSourceInternal ErrorSource = "internal" ErrorSourceExternal ErrorSource = "external" )
type PocketSession ¶
type PocketSession struct { SessionKey string `json:"sessionKey"` SessionHeight int `json:"sessionHeight"` PortalRegionName string `json:"portalRegionName"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*PocketSession) Validate ¶ added in v1.12.0
func (ps *PocketSession) Validate() error
type PortalRegion ¶
type PortalRegion struct {
PortalRegionName string `json:"portalRegionName"`
}
type Relay ¶
type Relay struct { RelayID int `json:"relayID"` PoktChainID string `json:"poktChainID"` EndpointID string `json:"endpointID"` SessionKey string `json:"sessionKey"` ProtocolAppPublicKey string `json:"protocolAppPublicKey"` RelaySourceURL string `json:"relaySourceUrl"` PoktNodeAddress string `json:"poktNodeAddress"` PoktNodeDomain string `json:"poktNodeDomain"` PoktNodePublicKey string `json:"poktNodePublicKey"` RelayStartDatetime time.Time `json:"relayStartDatetime"` RelayReturnDatetime time.Time `json:"relayReturnDatetime"` IsError bool `json:"isError"` ErrorCode int `json:"errorCode,omitempty"` ErrorName string `json:"errorName,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` ErrorType string `json:"errorType,omitempty"` ErrorSource ErrorSource `json:"errorSource,omitempty"` RelayRoundtripTime float64 `json:"relayRoundtripTime"` RelayChainMethodIDs []string `json:"relayChainMethodID"` RelayDataSize int `json:"relayDataSize"` RelayPortalTripTime float64 `json:"relayPortalTripTime"` RelayNodeTripTime float64 `json:"relayNodeTripTime"` RelayURLIsPublicEndpoint bool `json:"relayUrlIsPublicEndpoint"` PortalRegionName string `json:"portalRegionName"` IsAltruistRelay bool `json:"isAltruistRelay"` IsUserRelay bool `json:"isUserRelay"` RequestID string `json:"requestID"` PoktTxID string `json:"poktTxID"` GigastakeAppID string `json:"gigastakeAppID"` Session PocketSession `json:"session"` Region PortalRegion `json:"region"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` BlockingPlugin string `json:"blockingPlugin"` }
TODO: consider removing this type and use portal types instead
type ServiceRecord ¶ added in v1.7.0
type ServiceRecord struct { ServiceRecordID int `json:"serviceRecordID"` NodePublicKey string `json:"nodePublicKey"` PoktChainID string `json:"poktChainID"` SessionKey string `json:"sessionKey"` RequestID string `json:"requestID"` PortalRegionName string `json:"portalRegionName"` Latency float64 `json:"latency"` Tickets int `json:"tickets"` Result string `json:"result"` Available bool `json:"available"` Successes int `json:"successes"` Failures int `json:"failures"` P90SuccessLatency float64 `json:"p90SuccessLatency"` MedianSuccessLatency float64 `json:"medianSuccessLatency"` WeightedSuccessLatency float64 `json:"weightedSuccessLatency"` SuccessRate float64 `json:"successRate"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*ServiceRecord) Validate ¶ added in v1.7.0
func (sr *ServiceRecord) Validate() (err error)
Click to show internal directories.
Click to hide internal directories.