driver

package
v0.10.25 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointName

func EndpointName(p string) string

EndpointName create endpoint name from string

Types

type Driver

type Driver struct {
	BaseURL     string
	FunctionURL map[string]string
	WorkerClient
}

Driver implements stucco driver interface calling protobuf workers over http with configurable workers base url

func (*Driver) Authorize

Authorize implements driver.Driver

func (*Driver) FieldResolve

FieldResolve implements driver.Driver

func (*Driver) InterfaceResolveType

InterfaceResolveType implements driver.Driver

func (*Driver) ScalarParse

ScalarParse implements driver.Driver

func (*Driver) ScalarSerialize

ScalarSerialize implements driver.Driver

func (*Driver) SetSecrets

SetSecrets implements driver.Driver

func (*Driver) Stream

Stream implements driver.Driver

func (*Driver) SubscriptionConnection

SubscriptionConnection implements driver.Driver

func (*Driver) SubscriptionListen

SubscriptionListen implements driver.Driver

func (*Driver) UnionResolveType

UnionResolveType implements driver.Driver

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient used by azure client

type ProtobufClient

type ProtobufClient struct {
	HTTPClient
	FunctionName string
}

ProtobufClient is a worker client using protobuf protocol

func (ProtobufClient) New

func (p ProtobufClient) New(u, f string) driver.Driver

New returns new driver using protobuf protocol

func (ProtobufClient) Post

func (p ProtobufClient) Post(url, contentType string, body io.Reader) (resp *http.Response, err error)

Post implemention for azure worker protobuf communication

type WorkerClient

type WorkerClient interface {
	New(url, fname string) driver.Driver
}

WorkerClient creates new protobuf for communication with workers

Jump to

Keyboard shortcuts

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