Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLogger = errors.NewKind("invalid logger configuration") ErrUnsupportedLanguage = errors.NewKind("unsupported language: %q") )
View Source
var DefaultDriver driver.Native = native.NewDriver("")
View Source
var ( // ManifestLocation location of the manifest file. Should not override // this variable unless you know what are you doing. ManifestLocation = "/opt/driver/etc/" + manifest.Filename )
Functions ¶
func Run ¶
func Run(t driver.Transforms)
Run is a common main function used as an entry point for drivers. It panics in case of an error.
Types ¶
type GRPCServer ¶
type GRPCServer struct { // Options list of grpc.ServerOption's. Options []grpc.ServerOption *grpc.Server // contains filtered or unexported fields }
GRPCServer is a common implementation of a gRPC server.
func NewGRPCServer ¶
func NewGRPCServer(drv driver.DriverModule, opts ...grpc.ServerOption) *GRPCServer
NewGRPCServer creates a gRPC server.
type Logger ¶
type Logger interface { Debugf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) }
Logger represents a generic logger, based on logrus.Logger
type LoggerFactory ¶
LoggerFactory is a helper for create logrus.Logger's
func (LoggerFactory) Apply ¶
func (c LoggerFactory) Apply() error
Apply configures the standard logrus Logger with the LoggerFactory values.
func (LoggerFactory) New ¶
func (c LoggerFactory) New() (Logger, error)
New returns a new logger based on the LoggerFactory values.
type Server ¶
type Server struct { *GRPCServer // Logger a logger to be used by the server. Logger Logger // contains filtered or unexported fields }
Server is a grpc server for the communication with the driver.
func NewServer ¶
func NewServer(d driver.DriverModule) *Server
NewServer returns a new server for a given Driver.
Click to show internal directories.
Click to hide internal directories.