You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package stencil helps to download and refresh protobuf descriptors from remote server and provides helper functions to get protobuf schema descriptors and can parse the messages dynamically\.
//ErrNotFound default sentinel error if proto not found
23
24
ErrNotFound = errors.New("not found")
24
25
)
25
26
```
26
27
27
-
## type [HTTPOptions](<https://github.com/odpf/stencil/blob/master/clients/go/client.go#L31-L36>)
28
-
29
-
HTTPOptions options for http client
30
-
31
-
```go
32
-
typeHTTPOptionsstruct {
33
-
// Timeout specifies a time limit for requests made by this client
34
-
Timeout time.Duration
35
-
// Headers provide extra headers to be added in requests made by this client
36
-
Headersmap[string]string
37
-
}
38
-
```
39
-
40
-
## type [Options](<https://github.com/odpf/stencil/blob/master/clients/go/client.go#L39-L46>)
28
+
## type [Client](<https://github.com/odpf/stencil/blob/master/clients/go/client.go#L24-L32>)
41
29
42
-
Options options for stencil client
30
+
Client provides utility functions to parse protobuf messages at runtime\. protobuf messages can be identified by specifying fully qualified generated proto java class name\.
43
31
44
32
```go
45
-
typeOptionsstruct {
46
-
// AutoRefresh boolean to enable or disable autorefresh. Default to false
47
-
AutoRefreshbool
48
-
// RefreshInterval refresh interval to fetch descriptor file from server.
49
-
RefreshInterval time.Duration
50
-
// HTTPOptions options for http client
51
-
HTTPOptions
52
-
}
53
-
```
54
-
55
-
## type [StencilClient](<https://github.com/odpf/stencil/blob/master/clients/go/client.go#L20-L28>)
56
-
57
-
StencilClient provides utility functions to parse protobuf messages at runtime\. protobuf messages can be identified by specifying fully qualified generated proto java class name\.
58
-
59
-
```go
60
-
typeStencilClientinterface {
33
+
typeClientinterface {
61
34
// Parse parses protobuf message from wire format to protoreflect.Message given fully qualified name of proto message.
62
35
// Returns ErrNotFound error if given class name is not found
0 commit comments