Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnectionWithAddress ¶
func NewConnectionWithAddress(peerAddress string, tslEnabled bool, creds credentials.TransportCredentials) (*grpc.ClientConn, error)
get time from config timeOut := viper.GetInt("grpc.timeout")
Types ¶
type Connection ¶
type Connection interface { Send(envelope *message.Envelope, successCallBack func(interface{}), errCallBack func(error)) Close() }
func NewConnection ¶
func NewConnection(clientStream pb.StreamService_StreamClient, serverStream pb.StreamService_StreamServer, conn *grpc.ClientConn, client pb.StreamServiceClient, handle ReceiveMessageHandle, connectionID string, cf context.CancelFunc) (Connection, error)
todo channel의 buffer size를 config에서 읽기
type ConnectionImpl ¶
직접적으로 grpc를 보내고 받는 역활 수행
func (*ConnectionImpl) Close ¶
func (conn *ConnectionImpl) Close()
func (*ConnectionImpl) ReadStream ¶
func (conn *ConnectionImpl) ReadStream(errChan chan error)
func (*ConnectionImpl) Send ¶
func (conn *ConnectionImpl) Send(envelope *message.Envelope, successCallBack func(interface{}), errCallBack func(error))
func (*ConnectionImpl) WriteStream ¶
func (conn *ConnectionImpl) WriteStream()
type ReceiveMessageHandle ¶
type ReceiveMessageHandle func(message msg.OutterMessage)
Click to show internal directories.
Click to hide internal directories.