@@ -14,8 +14,8 @@ import (
14
14
pb "github.com/smartcontractkit/chainlink-protos/storage-service/go"
15
15
)
16
16
17
- // WorlflowClient is a gRPC client for the node service to be used by workflow node.
18
- type WorlflowClient interface {
17
+ // WorkflowClient is a gRPC client for the node service to be used by workflow node.
18
+ type WorkflowClient interface {
19
19
// DownloadArtifact downloads an artifact from the storage service
20
20
DownloadArtifact (ctx context.Context , req * pb.DownloadArtifactRequest ) (pb.NodeService_DownloadArtifactClient , error )
21
21
@@ -26,7 +26,7 @@ type WorlflowClient interface {
26
26
Close () error
27
27
}
28
28
29
- // workflowClient is a concrete implementation of WorlflowClient
29
+ // workflowClient is a concrete implementation of WorkflowClient
30
30
type workflowClient struct {
31
31
client pb.NodeServiceClient
32
32
conn * grpc.ClientConn
@@ -85,14 +85,14 @@ func (n workflowClient) DownloadArtifactStream(ctx context.Context, req *pb.Down
85
85
func (n workflowClient ) Close () error {
86
86
err := n .conn .Close ()
87
87
if err != nil {
88
- n .log .Errorw ("Failed to close WorlflowClient connection" , "error" , err )
88
+ n .log .Errorw ("Failed to close WorkflowClient connection" , "error" , err )
89
89
return err
90
90
}
91
- n .log .Infow ("Closed WorlflowClient connection" )
91
+ n .log .Infow ("Closed WorkflowClient connection" )
92
92
return nil
93
93
}
94
94
95
- // NodeClientOpt is a functional option type for configuring the WorlflowClient
95
+ // NodeClientOpt is a functional option type for configuring the WorkflowClient
96
96
type NodeClientOpt func (* nodeConfig )
97
97
98
98
type nodeConfig struct {
@@ -101,7 +101,7 @@ type nodeConfig struct {
101
101
jwtGenerator * nodeauth.NodeJWTGenerator // Optional JWT manager for authentication
102
102
}
103
103
104
- // defaultNodeConfig returns a default configuration for the WorlflowClient
104
+ // defaultNodeConfig returns a default configuration for the WorkflowClient
105
105
func defaultNodeConfig () nodeConfig {
106
106
loggerInst , _ := logger .New ()
107
107
return nodeConfig {
@@ -111,14 +111,14 @@ func defaultNodeConfig() nodeConfig {
111
111
}
112
112
}
113
113
114
- // WithLogger sets the logger for the WorlflowClient
114
+ // WithLogger sets the logger for the WorkflowClient
115
115
func WithLogger (log logger.Logger ) NodeClientOpt {
116
116
return func (cfg * nodeConfig ) {
117
117
cfg .log = log
118
118
}
119
119
}
120
120
121
- // WithTransportCredentials sets the transport credentials for the WorlflowClient
121
+ // WithTransportCredentials sets the transport credentials for the WorkflowClient
122
122
func WithTransportCredentials (creds credentials.TransportCredentials ) NodeClientOpt {
123
123
return func (cfg * nodeConfig ) {
124
124
cfg .transportCredentials = creds
@@ -131,9 +131,9 @@ func WithJWTGenerator(jwtGenerator *nodeauth.NodeJWTGenerator) NodeClientOpt {
131
131
}
132
132
}
133
133
134
- // NewNodeClient creates a new WorlflowClient with the specified address and options
135
- // It returns a WorlflowClient which can DownloadArtifacts
136
- func NewNodeClient (ctx context.Context , address string , opts ... NodeClientOpt ) (WorlflowClient , error ) {
134
+ // NewNodeClient creates a new WorkflowClient with the specified address and options
135
+ // It returns a WorkflowClient which can DownloadArtifacts
136
+ func NewNodeClient (ctx context.Context , address string , opts ... NodeClientOpt ) (WorkflowClient , error ) {
137
137
cfg := defaultNodeConfig ()
138
138
139
139
for _ , opt := range opts {
@@ -149,7 +149,7 @@ func NewNodeClient(ctx context.Context, address string, opts ...NodeClientOpt) (
149
149
return nil , err
150
150
}
151
151
152
- cfg .log .Infow ("connected to storage service (WorlflowClient )" , "address" , address )
152
+ cfg .log .Infow ("connected to storage service (WorkflowClient )" , "address" , address )
153
153
154
154
client := pb .NewNodeServiceClient (conn )
155
155
0 commit comments