Documentation ¶
Index ¶
- type ClientOptions
- func (this *ClientOptions) Merge(opts ...*ClientOptions) *ClientOptions
- func (this *ClientOptions) SetCheckInterval(t time.Duration) *ClientOptions
- func (this *ClientOptions) SetChunksMaxSize(t int) *ClientOptions
- func (this *ClientOptions) SetCoderType(t coder.CoderType) *ClientOptions
- func (this *ClientOptions) SetCompressorType(t compressor.CompressType) *ClientOptions
- func (this *ClientOptions) SetHeartInterval(t time.Duration) *ClientOptions
- func (this *ClientOptions) SetIsStopHeart(is bool) *ClientOptions
- func (this *ClientOptions) SetSecret(s string) *ClientOptions
- func (this *ClientOptions) SetSerializer(s serializer.Serializer) *ClientOptions
- func (this *ClientOptions) SetTimeout(t time.Duration) *ClientOptions
- type CodecOptions
- type SendOptions
- func (this *SendOptions) Merge(opts ...*SendOptions) *SendOptions
- func (this *SendOptions) OverrideNil(coderT *coder.CoderType, compressT *compressor.CompressType, ...)
- func (this *SendOptions) SetChunksMaxSize(t int) *SendOptions
- func (this *SendOptions) SetCoderType(t coder.CoderType) *SendOptions
- func (this *SendOptions) SetCompressorType(t compressor.CompressType) *SendOptions
- func (this *SendOptions) SetIsSendRaw(b bool) *SendOptions
- func (this *SendOptions) SetSerializer(s serializer.Serializer) *SendOptions
- func (this *SendOptions) SetTimeout(t time.Duration) *SendOptions
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶
type ClientOptions struct { CoderType *coder.CoderType CompressType *compressor.CompressType serializer.Serializer Timeout *time.Duration CheckInterval *time.Duration HeartInterval *time.Duration ChunksSize *int IsStopHeart *bool Secret *string }
func Client ¶
func Client() *ClientOptions
func (*ClientOptions) Merge ¶
func (this *ClientOptions) Merge(opts ...*ClientOptions) *ClientOptions
func (*ClientOptions) SetCheckInterval ¶
func (this *ClientOptions) SetCheckInterval(t time.Duration) *ClientOptions
func (*ClientOptions) SetChunksMaxSize ¶
func (this *ClientOptions) SetChunksMaxSize(t int) *ClientOptions
func (*ClientOptions) SetCoderType ¶
func (this *ClientOptions) SetCoderType(t coder.CoderType) *ClientOptions
func (*ClientOptions) SetCompressorType ¶
func (this *ClientOptions) SetCompressorType(t compressor.CompressType) *ClientOptions
func (*ClientOptions) SetHeartInterval ¶
func (this *ClientOptions) SetHeartInterval(t time.Duration) *ClientOptions
func (*ClientOptions) SetIsStopHeart ¶
func (this *ClientOptions) SetIsStopHeart(is bool) *ClientOptions
func (*ClientOptions) SetSecret ¶
func (this *ClientOptions) SetSecret(s string) *ClientOptions
func (*ClientOptions) SetSerializer ¶
func (this *ClientOptions) SetSerializer(s serializer.Serializer) *ClientOptions
func (*ClientOptions) SetTimeout ¶
func (this *ClientOptions) SetTimeout(t time.Duration) *ClientOptions
type CodecOptions ¶
type CodecOptions struct { }
func Codec ¶
func Codec() *CodecOptions
func (*CodecOptions) Merge ¶
func (this *CodecOptions) Merge(opts ...*CodecOptions) *CodecOptions
type SendOptions ¶ added in v1.0.6
type SendOptions struct { CoderType *coder.CoderType CompressType *compressor.CompressType serializer.Serializer Timeout *time.Duration ChunksSize *int IsSendRaw *bool //有一种情况,就是发送的时候已经是data,就是已经marshal的数据,但是反解的时候又需要codetype. }
func Send ¶ added in v1.0.6
func Send() *SendOptions
func (*SendOptions) Merge ¶ added in v1.0.6
func (this *SendOptions) Merge(opts ...*SendOptions) *SendOptions
func (*SendOptions) OverrideNil ¶ added in v1.0.6
func (this *SendOptions) OverrideNil(coderT *coder.CoderType, compressT *compressor.CompressType, serializer serializer.Serializer, timeout *time.Duration, chunkSize *int)
只覆盖nil,最终发送的属性是client有一个默认属性,发送可以具体指定发送的属性
func (*SendOptions) SetChunksMaxSize ¶ added in v1.0.6
func (this *SendOptions) SetChunksMaxSize(t int) *SendOptions
func (*SendOptions) SetCoderType ¶ added in v1.0.6
func (this *SendOptions) SetCoderType(t coder.CoderType) *SendOptions
func (*SendOptions) SetCompressorType ¶ added in v1.0.6
func (this *SendOptions) SetCompressorType(t compressor.CompressType) *SendOptions
func (*SendOptions) SetIsSendRaw ¶ added in v1.0.9
func (this *SendOptions) SetIsSendRaw(b bool) *SendOptions
func (*SendOptions) SetSerializer ¶ added in v1.0.6
func (this *SendOptions) SetSerializer(s serializer.Serializer) *SendOptions
func (*SendOptions) SetTimeout ¶ added in v1.0.6
func (this *SendOptions) SetTimeout(t time.Duration) *SendOptions
type ServerOptions ¶
type ServerOptions struct { serializer.Serializer Secret *string }
func Server ¶
func Server() *ServerOptions
func (*ServerOptions) Merge ¶
func (this *ServerOptions) Merge(opts ...*ServerOptions) *ServerOptions
func (*ServerOptions) SetSecret ¶
func (this *ServerOptions) SetSecret(s string) *ServerOptions
func (*ServerOptions) SetSerializer ¶
func (this *ServerOptions) SetSerializer(s serializer.Serializer) *ServerOptions
Click to show internal directories.
Click to hide internal directories.