Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AfterSignal ¶
AfterSignal process의 종료을 뜻하는 모든 os signal, system call을 감시
Types ¶
type BytesPipeline ¶
BytesStream handle data with the sub stream
type BytesStream ¶
type BytesStream struct {
AtSubscribe func(data []byte)
*Observer
// contains filtered or unexported fields
}
BytesStream is bytestyped go channel stream
func NewBytesStream ¶
func NewBytesStream(obv *Observer) *BytesStream
NewBytesStream create the BytesStream
func (*BytesStream) Chunk ¶
func (bs *BytesStream) Chunk(size int) *BytesStream
Chunk gather data until fill the buffer
func (*BytesStream) Publish ¶
func (bs *BytesStream) Publish(target func()) *BytesStream
Publish the stream with the observer
func (*BytesStream) Send ¶
func (bs *BytesStream) Send(data []byte)
Send bytes data to the go channel
func (*BytesStream) Subscribe ¶
func (bs *BytesStream) Subscribe(call func([]byte))
Subscribe data from the go channel
type ObservHandler ¶
type ObservHandler struct {
AtComplete StateHandler
AtCancel StateHandler
AtError ErrHandler
}
ObservHandler Observer의 상태 변화에 따라 실행될 핸들러
func DefaultObservHandler ¶
func DefaultObservHandler() *ObservHandler
DefaultObservHandler 기본 핸들러 설정
type Observer ¶
type Observer struct {
DoneSubscribe chan struct{}
Handler ObservHandler
Target func()
WG sync.WaitGroup
// contains filtered or unexported fields
}
Observer Status를 모니터링하는 관찰자 객체
func (*Observer) AfterCancel ¶
func (o *Observer) AfterCancel() <-chan struct{}
AfterCancel Observable을 취소하기 위한 메소드
func (*Observer) Cancel ¶
func (o *Observer) Cancel()
Cancel Observ 활동을 취소시킨다. NOTE Observ의 종료와 동시에 Subscribe도 종료된다. NOTE Cancel시에 데이터를 완전히 보장하지 않고, 바로 종료시킨다.
func (*Observer) OnComplete ¶
func (o *Observer) OnComplete()
OnComplete Observer의 활동을 끝낸다. Observable 에서 return과 동반되거나 종료될 때 사용
Click to show internal directories.
Click to hide internal directories.