func (ns *NetworkServer) ReportTxAcknowledgment(_ context.Context, req *ttnpb.GatewayTxAcknowledgment) (*pbtypes.Empty, error) {
	select {
	case ns.TxAck <- req:
	default:
	}
	return ttnpb.Empty, nil
}
ReportTxAcknowledgment implements ttnpb.GsNsServer.
package mock
import (
	"context"
	pbtypes "github.com/gogo/protobuf/types"
	"github.com/grpc-ecosystem/grpc-gateway/runtime"
	"go.thethings.network/lorawan-stack/v3/pkg/component"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"google.golang.org/grpc"
)
type NetworkServer struct {
	*component.Component
	Uplink chan *ttnpb.UplinkMessage
	TxAck  chan *ttnpb.GatewayTxAcknowledgment
}
func NewNetworkServer(c *component.Component) (*NetworkServer, error) {
	ns := &NetworkServer{
		Component: c,
		Uplink:    make(chan *ttnpb.UplinkMessage, 1),
	}
	c.RegisterGRPC(ns)
	return ns, nil
}
func (ns *NetworkServer) Roles() []ttnpb.ClusterRole {
	return []ttnpb.ClusterRole{ttnpb.ClusterRole_NETWORK_SERVER}
}
func (ns *NetworkServer) RegisterServices(s *grpc.Server) {
	ttnpb.RegisterGsNsServer(s, ns)
}
func (ns *NetworkServer) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn) {
}
func (ns *NetworkServer) Publish(ctx context.Context, down *ttnpb.DownlinkMessage) error {
	client := ttnpb.NewNsPbaClient(ns.LoopbackConn())
	_, err := client.PublishDownlink(ctx, down, ns.WithClusterAuth())
	return err
}
func (ns *NetworkServer) HandleUplink(ctx context.Context, req *ttnpb.UplinkMessage) (*pbtypes.Empty, error) {
	select {
	case ns.Uplink <- req:
	default:
	}
	return ttnpb.Empty, nil
}