Documentation
¶
Index ¶
- type Options
- func (option Options) WithAutoAddServer(val bool) Options
- func (option Options) WithDialMetaServerTimeout(val time.Duration) Options
- func (option Options) WithGRPCPort(val int) Options
- func (option Options) WithHeartbeatInterval(val time.Duration) Options
- func (option Options) WithHost(val string) Options
- func (option Options) WithLogPath(val string) Options
- func (option Options) WithMetaServerAddr(val string) Options
- func (option Options) WithSStorePath(val string) Options
- func (option Options) WithServerID(val int64) Options
- type StreamServer
- func (server *StreamServer) GetStreamStat(ctx context.Context, request *proto.GetStreamStatRequest) (*proto.GetStreamStatResponse, error)
- func (server *StreamServer) ReadStream(request *proto.ReadStreamRequest, stream proto.StreamService_ReadStreamServer) error
- func (server *StreamServer) Start() error
- func (server *StreamServer) Stop(ctx context.Context) error
- func (server *StreamServer) WriteStream(stream proto.StreamService_WriteStreamServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
MetaServerAddr string `json:"meta_server_addr"`
ServerID int64 `json:"server_id"`
Host string `json:"grpc_bind_addr"`
GRPCPort int `json:"grpc_port"`
SStorePath string `json:"store_path"`
LogPath string `json:"log_path"`
AutoAddServer bool `json:"auto_add_server"`
LogLevel log.Level `json:"log_level"`
HeartbeatInterval time.Duration `json:"heartbeat_interval"`
DialMetaServerTimeout time.Duration `json:"dial_meta_server_timeout"`
}
func DefaultOptions ¶
func DefaultOptions() Options
func (Options) WithAutoAddServer ¶
func (Options) WithDialMetaServerTimeout ¶
func (Options) WithGRPCPort ¶
func (Options) WithHeartbeatInterval ¶
func (Options) WithLogPath ¶
func (Options) WithMetaServerAddr ¶
func (Options) WithSStorePath ¶
func (Options) WithServerID ¶
type StreamServer ¶
type StreamServer struct {
Options
ServerInfoBase *MSStore.ServerInfoBase
// contains filtered or unexported fields
}
func New ¶
func New(options Options) *StreamServer
func (*StreamServer) GetStreamStat ¶
func (server *StreamServer) GetStreamStat(ctx context.Context, request *proto.GetStreamStatRequest) (*proto.GetStreamStatResponse, error)
func (*StreamServer) ReadStream ¶
func (server *StreamServer) ReadStream(request *proto.ReadStreamRequest, stream proto.StreamService_ReadStreamServer) error
func (*StreamServer) Start ¶
func (server *StreamServer) Start() error
func (*StreamServer) WriteStream ¶
func (server *StreamServer) WriteStream(stream proto.StreamService_WriteStreamServer) error
Click to show internal directories.
Click to hide internal directories.