Documentation ¶
Index ¶
- func NewServer(address string, svc servicepb.EventdbServer, opts *Options) xserver.Server
- func NewService(db storage.Database, opts *ServiceOptions) servicepb.EventdbServer
- type Options
- func (o *Options) InstrumentOptions() instrument.Options
- func (o *Options) KeepAlivePeriod() time.Duration
- func (o *Options) MaxRecvMsgSize() int
- func (o *Options) ReadBufferSize() int
- func (o *Options) SetInstrumentOptions(v instrument.Options) *Options
- func (o *Options) SetKeepAlivePeriod(v time.Duration) *Options
- func (o *Options) SetMaxRecvMsgSize(v int) *Options
- func (o *Options) SetReadBufferSize(v int) *Options
- type ServiceOptions
- func (o *ServiceOptions) ClockOptions() clock.Options
- func (o *ServiceOptions) DocumentArrayPool() *document.BucketizedDocumentArrayPool
- func (o *ServiceOptions) FieldArrayPool() *field.BucketizedFieldArrayPool
- func (o *ServiceOptions) InstrumentOptions() instrument.Options
- func (o *ServiceOptions) ReadTimeout() time.Duration
- func (o *ServiceOptions) SetClockOptions(v clock.Options) *ServiceOptions
- func (o *ServiceOptions) SetDocumentArrayPool(v *document.BucketizedDocumentArrayPool) *ServiceOptions
- func (o *ServiceOptions) SetFieldArrayPool(v *field.BucketizedFieldArrayPool) *ServiceOptions
- func (o *ServiceOptions) SetInstrumentOptions(v instrument.Options) *ServiceOptions
- func (o *ServiceOptions) SetReadTimeout(v time.Duration) *ServiceOptions
- func (o *ServiceOptions) SetWriteTimeout(v time.Duration) *ServiceOptions
- func (o *ServiceOptions) WriteTimeout() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(db storage.Database, opts *ServiceOptions) servicepb.EventdbServer
NewService creates a new service.
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options provide a set of server options.
func (*Options) InstrumentOptions ¶
func (o *Options) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*Options) KeepAlivePeriod ¶
KeepAlivePeriod returns the keep alive period.
func (*Options) MaxRecvMsgSize ¶
MaxRecvMsgSize returns the max message size in bytes the server can receive.
func (*Options) ReadBufferSize ¶
ReadBufferSize returns the read buffer size. This determines how much data can be read at most for one read syscall.
func (*Options) SetInstrumentOptions ¶
func (o *Options) SetInstrumentOptions(v instrument.Options) *Options
SetInstrumentOptions sets the instrument options.
func (*Options) SetKeepAlivePeriod ¶
SetKeepAlivePeriod sets the keep alive period.
func (*Options) SetMaxRecvMsgSize ¶
SetMaxRecvMsgSize sets the max message size in bytes the server can receive.
func (*Options) SetReadBufferSize ¶
SetReadBufferSize sets the read buffer size. This determines how much data can be read at most for one read syscall.
type ServiceOptions ¶
type ServiceOptions struct {
// contains filtered or unexported fields
}
ServiceOptions provide a set of service options.
func NewServiceOptions ¶
func NewServiceOptions() *ServiceOptions
NewServiceOptions create a new set of service options.
func (*ServiceOptions) ClockOptions ¶
func (o *ServiceOptions) ClockOptions() clock.Options
ClockOptions returns the clock options.
func (*ServiceOptions) DocumentArrayPool ¶
func (o *ServiceOptions) DocumentArrayPool() *document.BucketizedDocumentArrayPool
DocumentArrayPool returns the document array pool.
func (*ServiceOptions) FieldArrayPool ¶
func (o *ServiceOptions) FieldArrayPool() *field.BucketizedFieldArrayPool
FieldArrayPool returns the field array pool.
func (*ServiceOptions) InstrumentOptions ¶
func (o *ServiceOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*ServiceOptions) ReadTimeout ¶
func (o *ServiceOptions) ReadTimeout() time.Duration
ReadTimeout returns the read timeout.
func (*ServiceOptions) SetClockOptions ¶
func (o *ServiceOptions) SetClockOptions(v clock.Options) *ServiceOptions
SetClockOptions sets the clock options.
func (*ServiceOptions) SetDocumentArrayPool ¶
func (o *ServiceOptions) SetDocumentArrayPool(v *document.BucketizedDocumentArrayPool) *ServiceOptions
SetDocumentArrayPool sets the document array pool.
func (*ServiceOptions) SetFieldArrayPool ¶
func (o *ServiceOptions) SetFieldArrayPool(v *field.BucketizedFieldArrayPool) *ServiceOptions
SetFieldArrayPool sets the field array pool.
func (*ServiceOptions) SetInstrumentOptions ¶
func (o *ServiceOptions) SetInstrumentOptions(v instrument.Options) *ServiceOptions
SetInstrumentOptions sets the instrument options.
func (*ServiceOptions) SetReadTimeout ¶
func (o *ServiceOptions) SetReadTimeout(v time.Duration) *ServiceOptions
SetReadTimeout sets the read timeout.
func (*ServiceOptions) SetWriteTimeout ¶
func (o *ServiceOptions) SetWriteTimeout(v time.Duration) *ServiceOptions
SetWriteTimeout sets the write timeout.
func (*ServiceOptions) WriteTimeout ¶
func (o *ServiceOptions) WriteTimeout() time.Duration
WriteTimeout returns the write timeout.