Documentation ¶
Index ¶
- func NewInstrument(next v0proto.ThumbnailServiceHandler, metrics *metrics.Metrics) v0proto.ThumbnailServiceHandler
- func NewLogging(next v0proto.ThumbnailServiceHandler, logger log.Logger) v0proto.ThumbnailServiceHandler
- func NewService(opts ...Option) v0proto.ThumbnailServiceHandler
- func NewTracing(next v0proto.ThumbnailServiceHandler) v0proto.ThumbnailServiceHandler
- type Option
- type Options
- type Thumbnail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstrument ¶
func NewInstrument(next v0proto.ThumbnailServiceHandler, metrics *metrics.Metrics) v0proto.ThumbnailServiceHandler
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
func NewLogging(next v0proto.ThumbnailServiceHandler, logger log.Logger) v0proto.ThumbnailServiceHandler
NewLogging returns a service that logs messages.
func NewService ¶
func NewService(opts ...Option) v0proto.ThumbnailServiceHandler
NewService returns a service implementation for Service.
func NewTracing ¶
func NewTracing(next v0proto.ThumbnailServiceHandler) v0proto.ThumbnailServiceHandler
NewTracing returns a service that instruments traces.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func Middleware ¶
Middleware provides a function to set the middleware option.
func ThumbnailSource ¶
ThumbnailSource provides a function to set the image source option.
func ThumbnailStorage ¶
ThumbnailStorage provides a function to set the thumbnail storage option.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler ThumbnailStorage storage.Storage ImageSource imgsource.Source }
Options defines the available options for this package.
type Thumbnail ¶
type Thumbnail struct {
// contains filtered or unexported fields
}
Thumbnail implements the GRPC handler.
func (Thumbnail) GetThumbnail ¶
func (g Thumbnail) GetThumbnail(ctx context.Context, req *v0proto.GetRequest, rsp *v0proto.GetResponse) error
GetThumbnail retrieves a thumbnail for an image
Click to show internal directories.
Click to hide internal directories.