Documentation
¶
Index ¶
- type Joiner
- type Option
- type QAAgent
- func (q *QAAgent) ConnectMulticast(ctx context.Context, req *pb.ConnectMulticastRequest) (*pb.Result, error)
- func (q *QAAgent) ConnectUnicast(ctx context.Context, req *pb.ConnectUnicastRequest) (*pb.Result, error)
- func (q *QAAgent) CreateMulticastGroup(ctx context.Context, req *pb.CreateMulticastGroupRequest) (*pb.Result, error)
- func (q *QAAgent) DeleteMulticastGroup(ctx context.Context, req *pb.DeleteMulticastGroupRequest) (*pb.Result, error)
- func (q *QAAgent) Disconnect(ctx context.Context, req *emptypb.Empty) (*pb.Result, error)
- func (q *QAAgent) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.StatusResponse, error)
- func (q *QAAgent) MulticastAllowListAdd(ctx context.Context, req *pb.MulticastAllowListAddRequest) (*pb.Result, error)
- func (q *QAAgent) MulticastJoin(ctx context.Context, req *pb.MulticastJoinRequest) (*pb.MulticastJoinResult, error)
- func (q *QAAgent) MulticastLeave(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
- func (q *QAAgent) MulticastReport(ctx context.Context, req *pb.MulticastReportRequest) (*pb.MulticastReportResult, error)
- func (q *QAAgent) MulticastSend(ctx context.Context, req *pb.MulticastSendRequest) (*emptypb.Empty, error)
- func (q *QAAgent) Ping(ctx context.Context, req *pb.PingRequest) (*pb.PingResult, error)
- func (q *QAAgent) Start(ctx context.Context) error
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QAAgent ¶
type QAAgent struct {
pb.UnimplementedQAAgentServiceServer
// contains filtered or unexported fields
}
func NewQAAgent ¶
NewQAAgent creates a new QAAgent instance. It accepts an address (i.e. localhost:443) to listen on and a Joiner interface for managing multicast group joins.
func (*QAAgent) ConnectMulticast ¶
func (q *QAAgent) ConnectMulticast(ctx context.Context, req *pb.ConnectMulticastRequest) (*pb.Result, error)
ConnectMulticast implements the ConnectMulticast RPC, which connects to a multicast group as either a publisher or subscriber.
func (*QAAgent) ConnectUnicast ¶
func (q *QAAgent) ConnectUnicast(ctx context.Context, req *pb.ConnectUnicastRequest) (*pb.Result, error)
ConnectUnicast implements the ConnectUnicast RPC. This establishes a unicast tunnel to DoubleZero using IBRL mode. This call will block until the tunnel is up according to the DoubleZero status output or return an error if the tunnel is not up within 20 seconds.
func (*QAAgent) CreateMulticastGroup ¶
func (q *QAAgent) CreateMulticastGroup(ctx context.Context, req *pb.CreateMulticastGroupRequest) (*pb.Result, error)
CreateMulticastGroup implements the CreateMulticastGroup RPC, which creates a multicast group with the specified code and maximum bandwidth.
func (*QAAgent) DeleteMulticastGroup ¶
func (q *QAAgent) DeleteMulticastGroup(ctx context.Context, req *pb.DeleteMulticastGroupRequest) (*pb.Result, error)
DeleteMulticastGroup implements the DeleteMulticastGroup RPC, which deletes a multicast group by its public key.
func (*QAAgent) Disconnect ¶
Disconnect implements the Disconnect RPC, which removes the current tunnel from DoubleZero.
func (*QAAgent) GetStatus ¶
GetStatus implements the GetStatus RPC, which retrieves the current status of the configured DoubleZero tunnel. This is equivalent to the `doublezero status` command.
func (*QAAgent) MulticastAllowListAdd ¶
func (q *QAAgent) MulticastAllowListAdd(ctx context.Context, req *pb.MulticastAllowListAddRequest) (*pb.Result, error)
MulticastAllowListAdd implements the MulticastAllowListAdd RPC, which adds a publisher or subscriber to the multicast allowlist for a specific group.
func (*QAAgent) MulticastJoin ¶
func (q *QAAgent) MulticastJoin(ctx context.Context, req *pb.MulticastJoinRequest) (*pb.MulticastJoinResult, error)
MulticastJoin implements the MulticastJoin RPC, joins the requested multicast group and counts received packets per joined group. Use the GetStatistics RPC to retrieve the stats.
func (*QAAgent) MulticastLeave ¶
MulticastLeave implements the MulticastLeave RPC and stops listening to all multicast groups.
func (*QAAgent) MulticastReport ¶
func (q *QAAgent) MulticastReport(ctx context.Context, req *pb.MulticastReportRequest) (*pb.MulticastReportResult, error)
MulticastReport implements the MulticastReport RPC, which retrieves statistics for multicast groups that the agent is currently listening to. It returns the number of packets received for each group.
func (*QAAgent) MulticastSend ¶
func (q *QAAgent) MulticastSend(ctx context.Context, req *pb.MulticastSendRequest) (*emptypb.Empty, error)
MulticastSend implements the MulticastSend RPC, which sends multicast packets to a specified group for a given duration.
func (*QAAgent) Ping ¶
func (q *QAAgent) Ping(ctx context.Context, req *pb.PingRequest) (*pb.PingResult, error)
Ping implements the Ping RPC, executes a set of ICMP pings, and reports the results to the caller. This requires CAP_NET_RAW capability to run successfully due to the use of raw sockets.