Skip to content

Commit

Permalink
add provider grpc to node remote config
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaCat committed Aug 29, 2023
1 parent a514951 commit c18edeb
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions node/remote/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ import (

// Details represents a node details for a remote node
type Details struct {
RPC *RPCConfig `yaml:"rpc"`
GRPC *GRPCConfig `yaml:"grpc"`
RPC *RPCConfig `yaml:"rpc"`
GRPC *GRPCConfig `yaml:"grpc"`
ProviderGRPC *GRPCConfig `yaml:"provider_grpc"`
}

func NewDetails(rpc *RPCConfig, grpc *GRPCConfig) *Details {
func NewDetails(rpc *RPCConfig, grpc, providerGrpc *GRPCConfig) *Details {
return &Details{
RPC: rpc,
GRPC: grpc,
RPC: rpc,
GRPC: grpc,
ProviderGRPC: providerGrpc,
}
}

func DefaultDetails() *Details {
return NewDetails(DefaultRPCConfig(), DefaultGrpcConfig())
return NewDetails(DefaultRPCConfig(), DefaultGrpcConfig(), DefaultProviderGrpcConfig())
}

// Validate implements node.Details
Expand Down Expand Up @@ -77,3 +79,8 @@ func NewGrpcConfig(address string, insecure bool) *GRPCConfig {
func DefaultGrpcConfig() *GRPCConfig {
return NewGrpcConfig("localhost:9090", true)
}

// DefaultProviderGrpcConfig returns the default instance of a ProviderGrpcConfig
func DefaultProviderGrpcConfig() *GRPCConfig {
return NewGrpcConfig("localhost:9090", true)
}

0 comments on commit c18edeb

Please sign in to comment.