Documentation ¶
Index ¶
- Constants
- func SetVerbose(value bool)
- type CloudError
- type Conn
- type ConnectFunc
- type Option
- func WithChipperURL(url string) Option
- func WithConnectFunc(connectFn ConnectFunc) Option
- func WithConnectionCheckOptions(opts chipper.ConnectOpts) Option
- func WithIntentOptions(opts chipper.IntentOpts, mode cloud.StreamType) Option
- func WithKnowledgeGraphOptions(opts chipper.KGOpts) Option
- func WithTokener(t token.Accessor, require bool) Option
- type Receiver
- type Streamer
Constants ¶
View Source
const (
HeadRequestTimeout = 8 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloudError ¶
type ConnectFunc ¶
type ConnectFunc func(context.Context) (Conn, *CloudError)
type Option ¶
type Option func(o *options)
func WithChipperURL ¶
func WithConnectFunc ¶
func WithConnectFunc(connectFn ConnectFunc) Option
WithConnectFunc allows tests to provide a separate connection interface for the streamer, to mock connections instead of using real ones
func WithConnectionCheckOptions ¶
func WithConnectionCheckOptions(opts chipper.ConnectOpts) Option
func WithIntentOptions ¶
func WithIntentOptions(opts chipper.IntentOpts, mode cloud.StreamType) Option
type Receiver ¶
type Receiver interface { OnError(cloud.ErrorType, error) OnStreamOpen(string) OnIntent(*cloud.IntentResult) OnConnectionResult(*cloud.ConnectionResult) }
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func NewStreamer ¶
func (*Streamer) AddSamples ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.