Skip to content

Commit

Permalink
IObjectSection.Value(), IArraySection.Next(), IMapSection.Next(): req…
Browse files Browse the repository at this point in the history
…uest context arg added
  • Loading branch information
host6 committed Sep 4, 2023
1 parent d13e096 commit ab24e26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

package ibus

import "context"

// HTTPMethod s.e.
// see const.go/HTTPMethodGET...
type HTTPMethod int
Expand Down Expand Up @@ -78,21 +80,21 @@ type IObjectSection interface {
IDataSection
// Caller MUST call Value() even if it does not need the value
// note: second and further Value() calls will return nil
Value() []byte
Value(ctx context.Context) []byte
}

// IArraySection s.e.
type IArraySection interface {
IDataSection
// Caller MUST call Next() until !ok
Next() (value []byte, ok bool)
Next(ctx context.Context) (value []byte, ok bool)
}

// IMapSection s.e.
type IMapSection interface {
IDataSection
// Caller MUST call Next() until !ok
Next() (name string, value []byte, ok bool)
Next(ctx context.Context) (name string, value []byte, ok bool)
}

// IResultSender used by ParallelFunction
Expand Down

0 comments on commit ab24e26

Please sign in to comment.