Skip to content

Commit

Permalink
chore: add warning comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina-Sakai committed Feb 10, 2025
1 parent 016a9de commit c37f55a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pkg/generic/pbidl_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func NewPbContentProvider(main string, includes map[string]string) (PbDescriptor
return p, nil
}

// UpdateIDL updates idl
// NOTE: Since an IDL update is asynchronous, it may not be applied immediately, potentially causing a temporary data inconsistency.
func (p *PbContentProvider) UpdateIDL(main string, includes map[string]string) error {
sd, err := parseProto(main, includes)
if err != nil {
Expand Down Expand Up @@ -140,6 +142,8 @@ func NewPbContentProviderWithDynamicGo(ctx context.Context, options dproto.Optio
return p, nil
}

// UpdateIDL updates idl
// NOTE: Since an IDL update is asynchronous, it may not be applied immediately, potentially causing a temporary data inconsistency.
func (p *PbFileProviderWithDynamicGo) UpdateIDL(ctx context.Context, options dproto.Options, mainPath, mainContent string, includes map[string]string) error {
sd, err := options.NewDesccriptorFromContent(ctx, mainPath, mainContent, includes)
if err != nil {
Expand Down
6 changes: 4 additions & 2 deletions pkg/generic/thriftidl_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ func NewThriftContentProviderWithDynamicGo(main string, includes map[string]stri
return p, nil
}

// UpdateIDL ...
// UpdateIDL updates idl
// NOTE: Since an IDL update is asynchronous, it may not be applied immediately, potentially causing a temporary data inconsistency.
func (p *ThriftContentProvider) UpdateIDL(main string, includes map[string]string) error {
var svc *descriptor.ServiceDescriptor
tree, err := ParseContent(defaultMainIDLPath, main, includes, false)
Expand Down Expand Up @@ -388,7 +389,8 @@ func NewThriftContentWithAbsIncludePathProviderWithDynamicGo(mainIDLPath string,
return p, nil
}

// UpdateIDL update idl by given args
// UpdateIDL updates idl
// NOTE: Since an IDL update is asynchronous, it may not be applied immediately, potentially causing a temporary data inconsistency.
func (p *ThriftContentWithAbsIncludePathProvider) UpdateIDL(mainIDLPath string, includes map[string]string) error {
mainIDLContent, ok := includes[mainIDLPath]
if !ok {
Expand Down

0 comments on commit c37f55a

Please sign in to comment.