Showing 1,008 of 1,820 total issues
Function ConvertSecretWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Secret
checkFuncs []SecretCheckFunc
)
Function ConvertClusterWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Cluster
checkFuncs []ClusterCheckFunc
)
Function ConvertServiceWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Service
checkFuncs []ServiceCheckFunc
)
Function ConvertConfigWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Config
checkFuncs []ConfigCheckFunc
)
Function ConvertVolumeWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Volume
checkFuncs []VolumeCheckFunc
)
Function ConvertNetworkWatch
has 8 return statements (exceeds 4 allowed). Open
Open
func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Network
checkFuncs []NetworkCheckFunc
)
Method raftProxyDispatcherServer.Tasks
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyDispatcherServer) Tasks(r *TasksRequest, stream Dispatcher_TasksServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Method raftProxyLogBrokerServer.ListenSubscriptions
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyLogBrokerServer) ListenSubscriptions(r *ListenSubscriptionsRequest, stream LogBroker_ListenSubscriptionsServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Method raftProxyDispatcherServer.Session
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyDispatcherServer) Session(r *SessionRequest, stream Dispatcher_SessionServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Function sanitizeResource
has 8 return statements (exceeds 4 allowed). Open
Open
func sanitizeResource(nodeRes []*api.GenericResource, res *api.GenericResource) (ok bool, nrs []*api.GenericResource) {
switch na := res.Resource.(type) {
case *api.GenericResource_DiscreteResourceSpec:
nrs := GetResource(na.DiscreteResourceSpec.Kind, nodeRes)
Method raftProxyDispatcherServer.Assignments
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyDispatcherServer) Assignments(r *AssignmentsRequest, stream Dispatcher_AssignmentsServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Method raftProxyLogsServer.SubscribeLogs
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyLogsServer) SubscribeLogs(r *SubscribeLogsRequest, stream Logs_SubscribeLogsServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Method ServiceSpec.MarshalToSizedBuffer
has 8 return statements (exceeds 4 allowed). Open
Open
func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
Method raftProxyWatchServer.Watch
has 8 return statements (exceeds 4 allowed). Open
Open
func (p *raftProxyWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error {
ctx := stream.Context()
conn, err := p.connSelector.LeaderConn(ctx)
if err != nil {
if err == raftselector.ErrIsLeader {
Method TaskSpec.MarshalToSizedBuffer
has 8 return statements (exceeds 4 allowed). Open
Open
func (m *TaskSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
Function CheckTasks
has 8 return statements (exceeds 4 allowed). Open
Open
func CheckTasks(ctx context.Context, s *store.MemoryStore, readTx store.ReadTx, initHandler InitHandler, startSupervisor restart.SupervisorInterface) error {
instances := make(map[orchestrator.SlotTuple][]*api.Task)
err := s.Batch(func(batch *store.Batch) error {
tasks, err := store.FindTasks(readTx, store.All)
if err != nil {
Method Server.UpdateCluster
has 8 return statements (exceeds 4 allowed). Open
Open
func (s *Server) UpdateCluster(ctx context.Context, request *api.UpdateClusterRequest) (*api.UpdateClusterResponse, error) {
if request.ClusterID == "" || request.ClusterVersion == nil {
return nil, status.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
}
if err := validateClusterSpec(request.Spec); err != nil {
Function validateClusterSpec
has 8 return statements (exceeds 4 allowed). Open
Open
func validateClusterSpec(spec *api.ClusterSpec) error {
if spec == nil {
return status.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
}
Method Manager.handleVolume
has 8 return statements (exceeds 4 allowed). Open
Open
func (vm *Manager) handleVolume(ctx context.Context, id string) error {
var volume *api.Volume
vm.store.View(func(tx store.ReadTx) {
volume = store.GetVolume(tx, id)
})
Method Server.ListServices
has 8 return statements (exceeds 4 allowed). Open
Open
func (s *Server) ListServices(ctx context.Context, request *api.ListServicesRequest) (*api.ListServicesResponse, error) {
var (
services []*api.Service
err error
)