Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Logger *zap.SugaredLogger
Functions ¶
func ParseEndpoint ¶
ParseEndpoint translates a string into proper solana endpoint.
• mainnet-beta, localhost, devnet, testnet, and mainnet-beta-serum is translated into proper urls.
• other strings are treated like urls.
• web socket port will be rpc port number if rpc port number is explicitly set; otherwise it assumes web socket and rpc are running on same port.
func RunServer ¶
func RunServer(ctx context.Context, rpc_urls, ws_urls []string, rpc_port, ws_port int) (<-chan struct{}, error)
RunServer launches servers for rpc and websockets in a separate go routine.
• the servers can be shut down by cancelling the input context.
• if rpc_port and ws_port is the same, only one single server will be launched.
• returned channel can be used to wait on the process to finish.
Types ¶
type UnknownJsonMap ¶
UnknownJsonMap contains all the value that is in json but not explicitly defined in struct