Beispiel #1
0
func (c *tchanMetaClient) Health(ctx Context) (*gen.HealthStatus, error) {
	var resp gen.MetaHealthResult
	args := gen.MetaHealthArgs{}
	success, err := c.client.Call(ctx, c.thriftService, "health", &args, &resp)
	if err == nil && !success {
	}

	return resp.GetSuccess(), err
}
Beispiel #2
0
func (c *tchanMetaClient) Health(ctx Context) (*meta.HealthStatus, error) {
	var resp meta.MetaHealthResult
	args := meta.MetaHealthArgs{}
	success, err := c.client.Call(ctx, "Meta", "health", &args, &resp)
	if err == nil && !success {
	}

	return resp.GetSuccess(), err
}
Beispiel #3
0
func (s *tchanMetaServer) handleHealth(ctx Context, protocol athrift.TProtocol) (bool, athrift.TStruct, error) {
	var req gen.MetaHealthArgs
	var res gen.MetaHealthResult

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

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

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

	return err == nil, &res, nil
}