Documentation
¶
Overview ¶
Copyright © 2021 Sebastien Leger
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Fetch(bg context.Context, clioEndpoint string, magic int64, fetchMax int64, ...) ([]byte, error)
- func GetBlockHeight(url string) (*int64, error)
- func Push(config *server.ClientConfig, ch chan<- Producer)
- func PushBlockNo(bg context.Context, clioEndpoint string, magic int64, port int64, ...) ([]byte, error)
- func Serve(config *server.ServerConfig, ch chan Producer)
- type BlockHeightResponse
- type FetchRequest
- type PoolIdsResponse
- type PoolMetadata
- type PoolParameters
- type PoolParametersResponse
- type PoolRelay
- type Producer
- type PullPayload
- type PushPayload
- type Query
- type QueryArgs
Constants ¶
View Source
const ( MaxMetadataLen = 1024 // https://cips.cardano.org/cips/cip6/ RequestMaxWaitTime = 1 * time.Second MaxWorkers = 16 WebsocketMethodName = "Query" WebsocketServiceName = "p2p" WebsocketQueryType = "jsonwsp/request" WebsocketVersion = "1.0" )
Variables ¶
This section is empty.
Functions ¶
func GetBlockHeight ¶ added in v0.1.2
func Push ¶
func Push(config *server.ClientConfig, ch chan<- Producer)
func PushBlockNo ¶ added in v0.1.2
func Serve ¶
func Serve(config *server.ServerConfig, ch chan Producer)
Types ¶
type BlockHeightResponse ¶ added in v0.1.2
type BlockHeightResponse struct {
Result *int64 `json:"result"`
}
type FetchRequest ¶
type PoolIdsResponse ¶ added in v0.1.0
type PoolIdsResponse struct {
Result []string `json:"result"`
}
type PoolMetadata ¶
type PoolParameters ¶ added in v0.1.0
type PoolParameters struct { Id string `json:"id"` Vrf string `json:"vrf"` Pledge uint64 `json:"pledge"` Cost uint64 `json:"cost"` Margin string `json:"margin"` RewardAccount string `json:"rewardAccount"` Owners []string `json:"owners"` Relays []PoolRelay `json:"relays"` Metadata PoolMetadata `json:"metadata"` }
func VetPools ¶ added in v0.1.0
func VetPools(url string) ([]*PoolParameters, error)
type PoolParametersResponse ¶ added in v0.1.0
type PoolParametersResponse struct {
Result map[string]PoolParameters `json:"result"`
}
type PullPayload ¶
type PushPayload ¶
Click to show internal directories.
Click to hide internal directories.