discoveryclient

package
v0.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodListMembers  rpcclient.Method = "ListMembers"
	MethodListGroups   rpcclient.Method = "ListGroups"
	MethodGetGroupMeta rpcclient.Method = "GetGroupMeta"
	MethodHeartbeat    rpcclient.Method = "Heartbeat"
)
View Source
const ProtocolVersionMajor = 0

Variables

This section is empty.

Functions

func New

func New(
	conf *yt.DiscoveryConfig,
	discoverer yt.Discoverer,
) (*client, error)

Types

type Encoder

type Encoder struct {
	StartCall func() *rpcclient.Call

	Invoke rpcclient.CallInvoker
}

func (*Encoder) GetGroupMeta

func (e *Encoder) GetGroupMeta(
	ctx context.Context,
	groupID string,
	opts *yt.GetGroupMetaOptions,
) (meta *yt.GroupMeta, err error)

func (*Encoder) Heartbeat

func (e *Encoder) Heartbeat(
	ctx context.Context,
	groupID string,
	memberInfo yt.MemberInfo,
	leaseTimeout int64,
	opts *yt.HeartbeatOptions,
) (err error)

func (*Encoder) ListGroups added in v0.0.13

func (e *Encoder) ListGroups(
	ctx context.Context,
	prefix string,
	opts *yt.ListGroupsOptions,
) (result *yt.ListGroupsResponse, err error)

func (*Encoder) ListMembers

func (e *Encoder) ListMembers(
	ctx context.Context,
	groupID string,
	opts *yt.ListMembersOptions,
) (members []*yt.MemberInfo, err error)

type GetGroupMetaRequest

type GetGroupMetaRequest struct {
	*discovery_client.TReqGetGroupMeta
}

func (GetGroupMetaRequest) Log

func (r GetGroupMetaRequest) Log() []log.Field

func (GetGroupMetaRequest) Path

func (r GetGroupMetaRequest) Path() (string, bool)

type HeartbeatRequest

type HeartbeatRequest struct {
	*discovery_client.TReqHeartbeat
}

func (HeartbeatRequest) Log

func (r HeartbeatRequest) Log() []log.Field

func (HeartbeatRequest) Path

func (r HeartbeatRequest) Path() (string, bool)

type ListGroupsRequest added in v0.0.13

type ListGroupsRequest struct {
	*discovery_client.TReqListGroups
}

func NewListGroupsRequest added in v0.0.13

func NewListGroupsRequest(r *discovery_client.TReqListGroups) *ListGroupsRequest

func (ListGroupsRequest) Log added in v0.0.13

func (r ListGroupsRequest) Log() []log.Field

func (ListGroupsRequest) Path added in v0.0.13

func (r ListGroupsRequest) Path() (string, bool)

type ListMembersRequest

type ListMembersRequest struct {
	*discovery_client.TReqListMembers
}

func (ListMembersRequest) Log

func (r ListMembersRequest) Log() []log.Field

func (ListMembersRequest) Path

func (r ListMembersRequest) Path() (string, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL