当前位置: 首页>>代码示例>>Golang>>正文


Golang grpc.Codec类代码示例

本文整理汇总了Golang中google/golang.org/grpc.Codec的典型用法代码示例。如果您正苦于以下问题:Golang Codec类的具体用法?Golang Codec怎么用?Golang Codec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Codec类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: _MysqlCtl_RunMysqlUpgrade_Handler

func _MysqlCtl_RunMysqlUpgrade_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(RunMysqlUpgradeRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(MysqlCtlServer).RunMysqlUpgrade(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:richarwu,项目名称:vitess,代码行数:11,代码来源:mysqlctl.pb.go

示例2: _Automation_GetClusterOperationDetails_Handler

func _Automation_GetClusterOperationDetails_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(automation.GetClusterOperationDetailsRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(AutomationServer).GetClusterOperationDetails(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:payintel,项目名称:vitess,代码行数:11,代码来源:automationservice.pb.go

示例3: _WordFilterService_Filter_Handler

func _WordFilterService_Filter_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(WordFilter_Text)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(WordFilterServiceServer).Filter(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:tenywen,项目名称:login-srv,代码行数:11,代码来源:wordfilter.pb.go

示例4: _SearchService_Search_Handler

func _SearchService_Search_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(SearchRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(SearchServiceServer).Search(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:herberteuler,项目名称:kythe,代码行数:11,代码来源:storage.pb.go

示例5: _Vitess_ExecuteBatchShards_Handler

func _Vitess_ExecuteBatchShards_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(vtgate.ExecuteBatchShardsRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(VitessServer).ExecuteBatchShards(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:ruiaylin,项目名称:vitess,代码行数:11,代码来源:vtgateservice.pb.go

示例6: _ChatService_Reg_Handler

func _ChatService_Reg_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(Chat_Id)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(ChatServiceServer).Reg(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:pengswift,项目名称:chat,代码行数:11,代码来源:chat.pb.go

示例7: _GraphStore_Write_Handler

func _GraphStore_Write_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(WriteRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(GraphStoreServer).Write(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:herberteuler,项目名称:kythe,代码行数:11,代码来源:storage.pb.go

示例8: _AuthService_Login_Handler

func _AuthService_Login_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(User_LoginInfo)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(AuthServiceServer).Login(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:anders007,项目名称:libs,代码行数:11,代码来源:auth.pb.go

示例9: _RouteGuide_GetFeature_Handler

func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(Point)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(RouteGuideServer).GetFeature(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:johndmulhausen,项目名称:kubernetes,代码行数:11,代码来源:route_guide.pb.go

示例10: _API_GetEventsByVolume_Handler

func _API_GetEventsByVolume_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(GetEventsByVolumeRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(APIServer).GetEventsByVolume(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go

示例11: _API_ListEvents_Handler

func _API_ListEvents_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(google_protobuf1.Empty)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(APIServer).ListEvents(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go

示例12: _API_Unmount_Handler

func _API_Unmount_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(UnmountRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(APIServer).Unmount(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:sr,项目名称:pachyderm,代码行数:11,代码来源:dockervolume.pb.go

示例13: _Api_GetPipelineRunStatus_Handler

func _Api_GetPipelineRunStatus_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(GetPipelineRunStatusRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(ApiServer).GetPipelineRunStatus(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:plar,项目名称:pachyderm,代码行数:11,代码来源:pps.pb.go

示例14: _Api_GetVersion_Handler

func _Api_GetVersion_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(google_protobuf.Empty)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(ApiServer).GetVersion(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:plar,项目名称:pachyderm,代码行数:11,代码来源:pps.pb.go

示例15: _Echo_Echo_Handler

func _Echo_Echo_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(EchoRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(EchoServer).Echo(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}
开发者ID:iamqizhao,项目名称:rpc-bench,代码行数:11,代码来源:echo.pb.go


注:本文中的google/golang.org/grpc.Codec类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。