github.com/vseinstrumentiru/lego@v1.0.2/internal/lego/app.go (about)

     1  package lego
     2  
     3  import (
     4  	"github.com/ThreeDotsLabs/watermill/message"
     5  	"github.com/gorilla/mux"
     6  	"go.opencensus.io/stats/view"
     7  	"google.golang.org/grpc"
     8  	"io"
     9  )
    10  
    11  type App interface {
    12  	GetName() string
    13  	SetLogErr(logErr LogErr)
    14  }
    15  
    16  type AppWithConfig interface {
    17  	WithCustomConfig
    18  }
    19  
    20  type AppWithHttp interface {
    21  	RegisterHTTP(router *mux.Router) error
    22  }
    23  
    24  type AppWithGrpc interface {
    25  	RegisterGRPC(server *grpc.Server) error
    26  }
    27  
    28  type AppWithEventHandlers interface {
    29  	RegisterEventHandlers(em EventManager) error
    30  }
    31  
    32  type AppWithPublishers interface {
    33  	RegisterEventDispatcher(publisher message.Publisher) error
    34  }
    35  
    36  type AppWithStats interface {
    37  	GetStats() []*view.View
    38  }
    39  
    40  type AppWithRegistration interface {
    41  	Register(p Process) (io.Closer, error)
    42  }
    43  
    44  type AppWithRunner interface {
    45  	Run(terminate chan bool) error
    46  }