Golang NewClientStream示例

说明

golang newclientstream示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Golang

命名空间/包名称: google/golang.org/grpc

示例#1
文件: value_api.pb.go 项目: wreese/oort

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
文件: game.pb.go 项目: anders007/libs

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
文件: route_guide.pb.go 项目: CocoaWang/grpc-go

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
文件: test.pb.go 项目: Clarifai/kubernetes

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
文件: openchain.pb.go 项目: masterDev1985/obc-peer

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
文件: long_tests_pb.pb.go 项目: stepancheg/grpc-rust

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
文件: protoprocess.pb.go 项目: peter-edge/proto-go

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
文件: grpc.pb.go 项目: gpaul/letmegrpc

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
文件: playsource_service.pb.go 项目: CrowdSoundSystem/go-client

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

func (c *leverRPCClient) HandleStreamingRPC(ctx context.Context, opts ...grpc.CallOption) (LeverRPC_HandleStreamingRPCClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_LeverRPC_serviceDesc.Streams[0], c.cc, "/core.LeverRPC/HandleStreamingRPC", opts...)
	if err != nil {
		return nil, err
	}
	x := &leverRPCHandleStreamingRPCClient{stream}
	return x, nil
}

示例#11
文件: chat_msg.pb.go 项目: alvindaiyan/goTalk2

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
}

示例#12
文件: init.pb.go 项目: liyangdal/kurma

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
}

示例#13
文件: init.pb.go 项目: liyangdal/kurma

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
}

示例#14
文件: grpclb.pb.go 项目: ruinanchen/grpc-go

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
}

示例#15
文件: services.pb.go 项目: CocoaWang/grpc-go

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
}

示例#16
文件: test.pb.go 项目: CocoaWang/grpc-go

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
}

示例#17
文件: services.pb.go 项目: CocoaWang/grpc-go

func (c *benchmarkServiceClient) StreamingCall(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingCallClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_BenchmarkService_serviceDesc.Streams[0], c.cc, "/grpc.testing.BenchmarkService/StreamingCall", opts...)
	if err != nil {
		return nil, err
	}
	x := &benchmarkServiceStreamingCallClient{stream}
	return x, nil
}

示例#18
文件: route_guide.pb.go 项目: johndmulhausen/kubernetes

func (c *routeGuideClient) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[1], c.cc, "/proto.RouteGuide/RecordRoute", opts...)
	if err != nil {
		return nil, err
	}
	x := &routeGuideRecordRouteClient{stream}
	return x, nil
}

示例#19
文件: api.pb.go 项目: hvaara/cockroach

func (c *distSQLClient) FlowStream(ctx context.Context, opts ...grpc.CallOption) (DistSQL_FlowStreamClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_DistSQL_serviceDesc.Streams[1], c.cc, "/cockroach.sql.distsql.DistSQL/FlowStream", opts...)
	if err != nil {
		return nil, err
	}
	x := &distSQLFlowStreamClient{stream}
	return x, nil
}

示例#20
文件: test.pb.go 项目: dpetersen/headerbug

func (c *fooClient) Bar(ctx context.Context, opts ...grpc.CallOption) (Foo_BarClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Foo_serviceDesc.Streams[0], c.cc, "/Foo/Bar", opts...)
	if err != nil {
		return nil, err
	}
	x := &fooBarClient{stream}
	return x, nil
}

示例#21
文件: drive.pb.go 项目: tottok-ug/pachyderm

func (c *aPIClient) PutBlock(ctx context.Context, opts ...grpc.CallOption) (API_PutBlockClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_API_serviceDesc.Streams[0], c.cc, "/.API/PutBlock", opts...)
	if err != nil {
		return nil, err
	}
	x := &aPIPutBlockClient{stream}
	return x, nil
}

示例#22
文件: message.pb.go 项目: hyperledger/fabric

func (c *gossipClient) GossipStream(ctx context.Context, opts ...grpc.CallOption) (Gossip_GossipStreamClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Gossip_serviceDesc.Streams[0], c.cc, "/proto.Gossip/GossipStream", opts...)
	if err != nil {
		return nil, err
	}
	x := &gossipGossipStreamClient{stream}
	return x, nil
}

示例#23
文件: bytestream.pb.go 项目: jfrazelle/s3server

func (c *byteStreamClient) Write(ctx context.Context, opts ...grpc.CallOption) (ByteStream_WriteClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_ByteStream_serviceDesc.Streams[1], c.cc, "/google.bytestream.ByteStream/Write", opts...)
	if err != nil {
		return nil, err
	}
	x := &byteStreamWriteClient{stream}
	return x, nil
}

示例#24
文件: chaincode.pb.go 项目: cotrone/fabric

func (c *chaincodeSupportClient) Register(ctx context.Context, opts ...grpc.CallOption) (ChaincodeSupport_RegisterClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_ChaincodeSupport_serviceDesc.Streams[0], c.cc, "/protos.ChaincodeSupport/Register", opts...)
	if err != nil {
		return nil, err
	}
	x := &chaincodeSupportRegisterClient{stream}
	return x, nil
}

示例#25
文件: raft.pb.go 项目: YuleiXiao/cockroach

func (c *multiRaftClient) RaftMessage(ctx context.Context, opts ...grpc.CallOption) (MultiRaft_RaftMessageClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_MultiRaft_serviceDesc.Streams[0], c.cc, "/cockroach.storage.MultiRaft/RaftMessage", opts...)
	if err != nil {
		return nil, err
	}
	x := &multiRaftRaftMessageClient{stream}
	return x, nil
}

示例#26
文件: a_bit_of_everything.pb.go 项目: ZubairNabi/grpc-gateway

func (c *aBitOfEverythingServiceClient) BulkEcho(ctx context.Context, opts ...grpc.CallOption) (ABitOfEverythingService_BulkEchoClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_ABitOfEverythingService_serviceDesc.Streams[2], c.cc, "/gengo.grpc.gateway.examples.examplepb.ABitOfEverythingService/BulkEcho", opts...)
	if err != nil {
		return nil, err
	}
	x := &aBitOfEverythingServiceBulkEchoClient{stream}
	return x, nil
}

示例#27
文件: events.pb.go 项目: yoshiharay/fabric

func (c *eventsClient) Chat(ctx context.Context, opts ...grpc.CallOption) (Events_ChatClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Events_serviceDesc.Streams[0], c.cc, "/protos.Events/Chat", opts...)
	if err != nil {
		return nil, err
	}
	x := &eventsChatClient{stream}
	return x, nil
}

示例#28
文件: api.pb.go 项目: CokkyWoo/friendfeed

func (c *apiClient) ForceArchiveFeed(ctx context.Context, opts ...grpc.CallOption) (Api_ForceArchiveFeedClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Api_serviceDesc.Streams[1], c.cc, "/proto.Api/ForceArchiveFeed", opts...)
	if err != nil {
		return nil, err
	}
	x := &apiForceArchiveFeedClient{stream}
	return x, nil
}

示例#29
文件: flow_combination.pb.go 项目: JohanSJA/grpc-gateway

func (c *flowCombinationClient) StreamEmptyStream(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyStreamClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_FlowCombination_serviceDesc.Streams[2], c.cc, "/gengo.grpc.gateway.examples.examplepb.FlowCombination/StreamEmptyStream", opts...)
	if err != nil {
		return nil, err
	}
	x := &flowCombinationStreamEmptyStreamClient{stream}
	return x, nil
}

示例#30
文件: analysis.pb.go 项目: herberteuler/kythe

func (c *fileDataServiceClient) Get(ctx context.Context, opts ...grpc.CallOption) (FileDataService_GetClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_FileDataService_serviceDesc.Streams[0], c.cc, "/kythe.proto.FileDataService/Get", opts...)
	if err != nil {
		return nil, err
	}
	x := &fileDataServiceGetClient{stream}
	return x, nil
}

展开阅读全文