func (client *Client) CreateStreamContext(
	ctx context.Context, stream *graylog.Stream,
) (*ErrorInfo, error) {
	if stream == nil {
		return nil, fmt.Errorf("stream is nil")
	}
	ret := map[string]string{}
	ei, err := client.callPost(ctx, client.Endpoints().Streams(), stream, &ret)
	if err != nil {
		return ei, err
	}
	if id, ok := ret["stream_id"]; ok {
		stream.ID = id
		return ei, nil
	}
	return ei, errors.New(`response doesn't have the field "stream_id"`)
}
// CreateStreamContext creates a stream with a context.
CreateStreamContext creates a stream with a context.
// CreateStreamContext creates a stream with a context .
func (client *Client) CreateStreamContext(
	ctx context.Context, stream *graylog.Stream,
) (*ErrorInfo, error) {
	if stream == nil {
		return nil, fmt.Errorf("stream is nil")
	}
	ret := map[string]string{}
	ei, err := client.callPost(ctx, client.Endpoints().Streams(), stream, &ret)
	if err != nil {
		return ei, err
	}
	if id, ok := ret["stream_id"]; ok {
		stream.ID = id
		return ei, nil
	}
	return ei, errors.New(`response doesn't have the field "stream_id"`)
}
func ( client * Client ) CreateStreamContext ( ctx context . Context , stream * graylog . Stream , ) ( * ErrorInfo , error ) { if stream == nil { return nil , fmt . Errorf ( " " ) } ret := map [ string ] string { } ei , err := client . callPost ( ctx , client . Endpoints ( ) . Streams ( ) , stream , & ret ) if err != nil { return ei , err } if id , ok := ret [ " " ] ; ok { stream . ID = id return ei , nil } return ei , errors . New ( `response doesn't have the field "stream_id"` ) }
CreateStreamContext creates a stream with a context.
CreateStreamContext creates a stream with a context .