Documentation ¶
Index ¶
- Variables
- func GracefulTerminateDetect()
- func GracefulTerminateExec(grpcServer *grpc.Server)
- type ClientBuilder
- type EscrowClientBuilder
- type ExchangeClientBuilder
- type GrpcServer
- func (s *GrpcServer) AcceptConnection() *GrpcServer
- func (s *GrpcServer) CreateHealthServer() *GrpcServer
- func (s *GrpcServer) CreateServer(serverName string, options ...grpc.ServerOption) *GrpcServer
- func (s *GrpcServer) GrpcServer(port string, dbURLs map[string]string, rdURL string, server interface{}, ...) *GrpcServer
- func (s *GrpcServer) RegisterHealthServer() *GrpcServer
- func (s *GrpcServer) RegisterServer(server interface{}) *GrpcServer
- func (s *GrpcServer) WithGracefulTermDetectAndExec() *GrpcServer
- func (s *GrpcServer) WithReflection() *GrpcServer
- type GuardClientBuilder
- type HealthCheckClientBuilder
- type HubParserClientBuilder
- type HubQueryClientBuilder
- type LedgerClientBuilder
- type RuntimeClientBuilder
- type RuntimeServer
- type SolidityClientBuilder
- type StatusClientBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var Startime = time.Now()
Functions ¶
func GracefulTerminateDetect ¶ added in v0.1.15
func GracefulTerminateDetect()
GracefulTerminateDetect catches SIGTERM and SIGINT This function only detects the signal. It does not do anything with the detect. Use GracefulTerminateExec func to cleanup else write your own after calling GracefulTerminateDetect
func GracefulTerminateExec ¶ added in v0.1.15
GracefulTerminateExec performs a default list of tasks to clean up Override this function in your package to do more.
Types ¶
type ClientBuilder ¶
type ClientBuilder struct {
// contains filtered or unexported fields
}
func (*ClientBuilder) Timeout ¶
func (b *ClientBuilder) Timeout(to time.Duration)
type EscrowClientBuilder ¶
type EscrowClientBuilder struct {
ClientBuilder
}
func EscrowClient ¶
func EscrowClient(addr string) *EscrowClientBuilder
func (*EscrowClientBuilder) WithContext ¶
func (g *EscrowClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client escrowpb.EscrowServiceClient) error) error
type ExchangeClientBuilder ¶ added in v0.2.21
type ExchangeClientBuilder struct {
ClientBuilder
}
func ExchangeClient ¶ added in v0.2.21
func ExchangeClient(addr string) *ExchangeClientBuilder
func (*ExchangeClientBuilder) WithContext ¶ added in v0.2.21
func (g *ExchangeClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client exchangepb.ExchangeClient) error) error
type GrpcServer ¶ added in v0.1.15
type GrpcServer struct {
// contains filtered or unexported fields
}
func (*GrpcServer) AcceptConnection ¶ added in v0.1.15
func (s *GrpcServer) AcceptConnection() *GrpcServer
func (*GrpcServer) CreateHealthServer ¶ added in v0.1.15
func (s *GrpcServer) CreateHealthServer() *GrpcServer
func (*GrpcServer) CreateServer ¶ added in v0.1.15
func (s *GrpcServer) CreateServer(serverName string, options ...grpc.ServerOption) *GrpcServer
func (*GrpcServer) GrpcServer ¶ added in v0.1.15
func (s *GrpcServer) GrpcServer(port string, dbURLs map[string]string, rdURL string, server interface{}, options ...grpc.ServerOption) *GrpcServer
func (*GrpcServer) RegisterHealthServer ¶ added in v0.1.15
func (s *GrpcServer) RegisterHealthServer() *GrpcServer
func (*GrpcServer) RegisterServer ¶ added in v0.1.15
func (s *GrpcServer) RegisterServer(server interface{}) *GrpcServer
func (*GrpcServer) WithGracefulTermDetectAndExec ¶ added in v0.1.15
func (s *GrpcServer) WithGracefulTermDetectAndExec() *GrpcServer
func (*GrpcServer) WithReflection ¶ added in v0.1.15
func (s *GrpcServer) WithReflection() *GrpcServer
type GuardClientBuilder ¶
type GuardClientBuilder struct {
ClientBuilder
}
func GuardClient ¶
func GuardClient(addr string) *GuardClientBuilder
func (*GuardClientBuilder) WithContext ¶
func (g *GuardClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client guardpb.GuardServiceClient) error) error
type HealthCheckClientBuilder ¶ added in v0.1.8
type HealthCheckClientBuilder struct {
ClientBuilder
}
func HealthCheckClient ¶ added in v0.1.8
func HealthCheckClient(addr string) *HealthCheckClientBuilder
func (*HealthCheckClientBuilder) WithContext ¶ added in v0.1.8
func (g *HealthCheckClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client grpc_health_v1.HealthClient) error) error
type HubParserClientBuilder ¶ added in v0.4.0
type HubParserClientBuilder struct {
ClientBuilder
}
func HubParserClient ¶ added in v0.4.0
func HubParserClient(addr string) *HubParserClientBuilder
hub-parser
func (*HubParserClientBuilder) WithContext ¶ added in v0.4.0
func (g *HubParserClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client hubpb.HubParseServiceClient) error) error
type HubQueryClientBuilder ¶
type HubQueryClientBuilder struct {
ClientBuilder
}
func (*HubQueryClientBuilder) WithContext ¶
func (g *HubQueryClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client hubpb.HubQueryServiceClient) error) error
type LedgerClientBuilder ¶ added in v0.1.9
type LedgerClientBuilder struct {
ClientBuilder
}
func LedgerClient ¶ added in v0.1.9
func LedgerClient(addr string) *LedgerClientBuilder
func (*LedgerClientBuilder) WithContext ¶ added in v0.1.9
func (g *LedgerClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client ledgerpb.ChannelsClient) error) error
type RuntimeClientBuilder ¶ added in v0.1.8
type RuntimeClientBuilder struct {
ClientBuilder
}
func RuntimeClient ¶ added in v0.1.8
func RuntimeClient(addr string) *RuntimeClientBuilder
func (*RuntimeClientBuilder) WithContext ¶ added in v0.1.8
func (g *RuntimeClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client sharedpb.RuntimeServiceClient) error) error
type RuntimeServer ¶ added in v0.1.15
type RuntimeServer struct { DB_URL map[string]string RD_URL string sharedpb.UnimplementedRuntimeServiceServer // contains filtered or unexported fields }
func (*RuntimeServer) CheckRuntime ¶ added in v0.1.15
func (s *RuntimeServer) CheckRuntime(ctx context.Context, req *sharedpb.SignedRuntimeInfoRequest) (*sharedpb.RuntimeInfoReport, error)
implementation of the shared helper function
type SolidityClientBuilder ¶ added in v0.2.21
type SolidityClientBuilder struct {
ClientBuilder
}
func SolidityClient ¶ added in v0.2.21
func SolidityClient(addr string) *SolidityClientBuilder
func (*SolidityClientBuilder) WithContext ¶ added in v0.2.21
func (g *SolidityClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client tronpb.WalletSolidityClient) error) error
type StatusClientBuilder ¶
type StatusClientBuilder struct {
ClientBuilder
}
func StatusClient ¶
func StatusClient(addr string) *StatusClientBuilder
func (*StatusClientBuilder) WithContext ¶
func (g *StatusClientBuilder) WithContext(ctx context.Context, f func(ctx context.Context, client statuspb.StatusServiceClient) error) error
Click to show internal directories.
Click to hide internal directories.