data

package
v0.0.0-...-5845185 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCClients

type RPCClients struct {
	HTTP, WS *ethclient.Client
}

RPCClients - Two clients connected to RPC node over both HTTP & WS transport

type Resources

type Resources struct {
	DB  *gorm.DB
	RPC *RPCClients
}

Resources - File, database, network resources which are to be accessed from several go routines, fulfilling different purposes, to be kept/ passed along using this struct

func Acquire

func Acquire(ctx context.Context) (*Resources, error)

Acquire - During application start up, acquire all resources

func (*Resources) Release

func (r *Resources) Release() error

Release - Before shutting down application, release resources in a graceful manner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL