cloudrun

package
v1.82.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticatedHTTPClient

func NewAuthenticatedHTTPClient() *http.Client

func NewTokenSource

func NewTokenSource(ctx context.Context, audience string) (oauth2.TokenSource, error)

Types

type Authorizer

type Authorizer interface {
	GRPCInterceptor() grpc.UnaryServerInterceptor

	// TODO(alberto): Eliminar cuando services/v2 desimplemente el metodo
	CheckIDToken(audience, subject string, handler routing.Handler) routing.Handler
}

type GRPCServer

type GRPCServer struct {
	*grpc.Server
	// contains filtered or unexported fields
}

func GRPC

func GRPC(opts ...Option) *GRPCServer

func (*GRPCServer) Gateway

func (server *GRPCServer) Gateway(fn func(context.Context, *runtime.ServeMux, string, []grpc.DialOption) error)

func (*GRPCServer) Serve

func (server *GRPCServer) Serve()

type Option

type Option func(cnf *config)

Option of a Cloud Run server.

func WithAuth

func WithAuth(auth Authorizer) Option

func WithCORS

func WithCORS(domains ...string) Option

WithCORS configures valid CORS origins for grpc-gateway APIs. Only valid with the GRPC() constructor.

func WithGRPCOptions

func WithGRPCOptions(opts ...grpc.ServerOption) Option

WithGRPCOptions configures GRPC server options. Only valid with the GRPC() constructor.

func WithProfiler

func WithProfiler() Option

WithProfiler enables the Google Cloud Profiler for the application.

func WithQueues

func WithQueues(fn func(*routing.Server)) Option

WithQueues initializes and configures the queues.

func WithRoutingOptions

func WithRoutingOptions(opts ...routing.ServerOption) Option

WithRoutingOptions configures web server options. Only valid with the Web() constructor.

type PubSubHandler

type PubSubHandler func(ctx context.Context, message *pubsub.Message) error

type WebServer

type WebServer struct {
	*routing.Server
	// contains filtered or unexported fields
}

func Web

func Web(opts ...Option) *WebServer

func (*WebServer) PubSub

func (server *WebServer) PubSub(subscription string, handler PubSubHandler)

func (*WebServer) Serve

func (server *WebServer) Serve()

Jump to

Keyboard shortcuts

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