本文整理汇总了Golang中google/golang.org/grpc.NewClientStream函数的典型用法代码示例。如果您正苦于以下问题:Golang NewClientStream函数的具体用法?Golang NewClientStream怎么用?Golang NewClientStream使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewClientStream函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: StreamDelete
func (c *valueStoreClient) StreamDelete(ctx context.Context, opts ...grpc.CallOption) (ValueStore_StreamDeleteClient, error) {
stream, err := grpc.NewClientStream(ctx, &_ValueStore_serviceDesc.Streams[3], c.cc, "/valueproto.ValueStore/StreamDelete", opts...)
if err != nil {
return nil, err
}
x := &valueStoreStreamDeleteClient{stream}
return x, nil
}
示例2: Stream
func (c *gameServiceClient) Stream(ctx context.Context, opts ...grpc.CallOption) (GameService_StreamClient, error) {
stream, err := grpc.NewClientStream(ctx, &_GameService_serviceDesc.Streams[0], c.cc, "/proto.GameService/Stream", opts...)
if err != nil {
return nil, err
}
x := &gameServiceStreamClient{stream}
return x, nil
}
示例3: RouteChat
func (c *routeGuideClient) RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error) {
stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[2], c.cc, "/routeguide.RouteGuide/RouteChat", opts...)
if err != nil {
return nil, err
}
x := &routeGuideRouteChatClient{stream}
return x, nil
}
示例4: HalfDuplexCall
func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) {
stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[3], c.cc, "/grpc.testing.TestService/HalfDuplexCall", opts...)
if err != nil {
return nil, err
}
x := &testServiceHalfDuplexCallClient{stream}
return x, nil
}
示例5: Chat
func (c *peerClient) Chat(ctx context.Context, opts ...grpc.CallOption) (Peer_ChatClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Peer_serviceDesc.Streams[0], c.cc, "/protos.Peer/Chat", opts...)
if err != nil {
return nil, err
}
x := &peerChatClient{stream}
return x, nil
}
示例6: CharCount
func (c *longTestsClient) CharCount(ctx context.Context, opts ...grpc.CallOption) (LongTests_CharCountClient, error) {
stream, err := grpc.NewClientStream(ctx, &_LongTests_serviceDesc.Streams[0], c.cc, "/LongTests/char_count", opts...)
if err != nil {
return nil, err
}
x := &longTestsCharCountClient{stream}
return x, nil
}
示例7: Do
func (c *aPIClient) Do(ctx context.Context, opts ...grpc.CallOption) (API_DoClient, error) {
stream, err := grpc.NewClientStream(ctx, &_API_serviceDesc.Streams[0], c.cc, "/protoprocess.API/Do", opts...)
if err != nil {
return nil, err
}
x := &aPIDoClient{stream}
return x, nil
}
示例8: Bidi
func (c *myTestClient) Bidi(ctx context.Context, opts ...grpc1.CallOption) (MyTest_BidiClient, error) {
stream, err := grpc1.NewClientStream(ctx, &_MyTest_serviceDesc.Streams[2], c.cc, "/grpc.MyTest/Bidi", opts...)
if err != nil {
return nil, err
}
x := &myTestBidiClient{stream}
return x, nil
}
示例9: QueueSong
func (c *playsourceClient) QueueSong(ctx context.Context, opts ...grpc.CallOption) (Playsource_QueueSongClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Playsource_serviceDesc.Streams[0], c.cc, "/Playsource.Playsource/QueueSong", opts...)
if err != nil {
return nil, err
}
x := &playsourceQueueSongClient{stream}
return x, nil
}
示例10: Chat
func (c *chatClient) Chat(ctx context.Context, opts ...grpc.CallOption) (Chat_ChatClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Chat_serviceDesc.Streams[0], c.cc, "/chat_msg.Chat/Chat", opts...)
if err != nil {
return nil, err
}
x := &chatChatClient{stream}
return x, nil
}
示例11: Enter
func (c *kurmaClient) Enter(ctx context.Context, opts ...grpc.CallOption) (Kurma_EnterClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Kurma_serviceDesc.Streams[1], c.cc, "/client.Kurma/Enter", opts...)
if err != nil {
return nil, err
}
x := &kurmaEnterClient{stream}
return x, nil
}
示例12: UploadImage
func (c *kurmaClient) UploadImage(ctx context.Context, opts ...grpc.CallOption) (Kurma_UploadImageClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Kurma_serviceDesc.Streams[0], c.cc, "/client.Kurma/UploadImage", opts...)
if err != nil {
return nil, err
}
x := &kurmaUploadImageClient{stream}
return x, nil
}
示例13: BalanceLoad
func (c *loadBalancerClient) BalanceLoad(ctx context.Context, opts ...grpc.CallOption) (LoadBalancer_BalanceLoadClient, error) {
stream, err := grpc.NewClientStream(ctx, &_LoadBalancer_serviceDesc.Streams[0], c.cc, "/grpc.lb.v1.LoadBalancer/BalanceLoad", opts...)
if err != nil {
return nil, err
}
x := &loadBalancerBalanceLoadClient{stream}
return x, nil
}
示例14: RunClient
func (c *workerServiceClient) RunClient(ctx context.Context, opts ...grpc.CallOption) (WorkerService_RunClientClient, error) {
stream, err := grpc.NewClientStream(ctx, &_WorkerService_serviceDesc.Streams[1], c.cc, "/grpc.testing.WorkerService/RunClient", opts...)
if err != nil {
return nil, err
}
x := &workerServiceRunClientClient{stream}
return x, nil
}
示例15: StreamingSearch
func (c *searchServiceClient) StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchService_StreamingSearchClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SearchService_serviceDesc.Streams[0], c.cc, "/grpc.testing.SearchService/StreamingSearch", opts...)
if err != nil {
return nil, err
}
x := &searchServiceStreamingSearchClient{stream}
return x, nil
}