func Setup(conf config.Config) error {
	b := backend.GetBackend()
	i := integration.GetIntegration()
	if b == nil {
		return errors.New("backend is not set")
	}
	if i == nil {
		return errors.New("integration is not set")
	}
	b.SetSubscribeEventFunc(gatewaySubscribeFunc)
	b.SetUplinkFrameFunc(uplinkFrameFunc)
	b.SetGatewayStatsFunc(gatewayStatsFunc)
	b.SetDownlinkTxAckFunc(downlinkTxAckFunc)
	b.SetRawPacketForwarderEventFunc(rawPacketForwarderEventFunc)
	i.SetDownlinkFrameFunc(downlinkFrameFunc)
	i.SetGatewayConfigurationFunc(gatewayConfigurationFunc)
	i.SetRawPacketForwarderCommandFunc(rawPacketForwarderCommandFunc)
	return nil
}
Setup configures the forwarder.
package forwarder
import (
	"github.com/gofrs/uuid"
	"github.com/pkg/errors"
	log "github.com/sirupsen/logrus"
	"github.com/brocaar/chirpstack-api/go/v3/gw"
	"github.com/brocaar/chirpstack-gateway-bridge/internal/backend"
	"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/events"
	"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
	"github.com/brocaar/chirpstack-gateway-bridge/internal/integration"
	"github.com/brocaar/chirpstack-gateway-bridge/internal/metadata"
	"github.com/brocaar/lorawan"
)