Beispiel #1
0
func (c *tchanMetaClient) VersionInfo(ctx Context) (*gen.VersionInfo, error) {
	var resp gen.MetaVersionInfoResult
	args := gen.MetaVersionInfoArgs{}
	success, err := c.client.Call(ctx, c.thriftService, "versionInfo", &args, &resp)
	if err == nil && !success {
	}

	return resp.GetSuccess(), err
}
Beispiel #2
0
func (s *tchanMetaServer) handleVersionInfo(ctx Context, protocol athrift.TProtocol) (bool, athrift.TStruct, error) {
	var req gen.MetaVersionInfoArgs
	var res gen.MetaVersionInfoResult

	if err := req.Read(protocol); err != nil {
		return false, nil, err
	}

	r, err :=
		s.handler.VersionInfo(ctx)

	if err != nil {
		return false, nil, err
	}
	res.Success = r

	return err == nil, &res, nil
}