handler

package
v0.0.0-...-4e1f151 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package handler provides the functionality of HTTP/2 gRPC gateway. It receives request and returns response.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AptxService

type AptxService struct {
	aptxv1.UnimplementedAptxServiceServer
	// contains filtered or unexported fields
}

AptxService handles HTTP/2 gRPC request for URL aptx. It implements gRPC service server.

func NewAptxService

func NewAptxService(creator usecase.CreateShortURL, getter usecase.GetURL) *AptxService

NewAptxService creates an instance of AptxService.

func (*AptxService) GetAllURL

GetAllURL handles HTTP/2 gRPC request similar to GET in HTTP/1.1. Its specific job is to get all available URLs in the system.

func (*AptxService) GetURLDetail

GetURLDetail handles HTTP/2 gRPC request similar to GET in HTTP/1.1. Its specific job is to get a detail of a single short URL.

func (*AptxService) ShortenURL

ShortenURL handles HTTP/2 gRPC request similar to POST in HTTP/1.1.

func (*AptxService) StreamAllURL

StreamAllURL handles HTTP/2 gRPC request similar to GET in HTTP/1.1. Its specific job is to get all available URLs in the system using stream.

type HealthService

type HealthService struct {
	grpchealthv1.UnimplementedHealthServer
	// contains filtered or unexported fields
}

HealthService handles HTTP/2 gRPC request for health checking.

func NewHealthService

func NewHealthService(checker usecase.CheckHealth) *HealthService

NewHealthService creates an instance of HealthService.

func (*HealthService) Check

Check checks the entire system health, including its dependecies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL