func NewHeaderReader(header *shared.Header) HeaderReader {
	return &headerReader{header}
}
NewHeaderReader returns a header reader interface
package internal
import (
	"context"
	"go.uber.org/cadence/.gen/go/shared"
)
type HeaderWriter interface {
	Set(string, []byte)
}
type HeaderReader interface {
	ForEachKey(handler func(string, []byte) error) error
}
type ContextPropagator interface {
	Inject(context.Context, HeaderWriter) error
	Extract(context.Context, HeaderReader) (context.Context, error)
	InjectFromWorkflow(Context, HeaderWriter) error
	ExtractToWorkflow(Context, HeaderReader) (Context, error)
}
type headerReader struct {
	header *shared.Header
}
func (hr *headerReader) ForEachKey(handler func(string, []byte) error) error {
	if hr.header == nil {
		return nil
	}
	for key, value := range hr.header.Fields {
		if err := handler(key, value); err != nil {
			return err
		}
	}
	return nil
}