service

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(endpoint string, insecure bool, port string) api.HellomicroClient

Client returns a client for hellomicro

func EtagHandler added in v0.2.3

func EtagHandler(h http.Handler, minBytes int) http.Handler

EtagHandler wraps an http.Handler and will write an Etag header to the response if the request method is GET and the response size is greater than or equal to minBytes. It will also return a NotModified response if the If-None-Match header matches the Etag header.

func MapSAToMapApiSA

func MapSAToMapApiSA(input map[string][]string) map[string]*api.StringArray

Types

type MetadataFunc

type MetadataFunc func(c context.Context, r *http.Request) metadata.MD

type RequestEcho

type RequestEcho struct {
	Cookies []*http.Cookie
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(endpoint string, port string) *Service

func (*Service) Crash

func (service *Service) Crash(ctx context.Context, request *empty.Empty) (*empty.Empty, error)

func (*Service) DeleteFile

func (service *Service) DeleteFile(ctx context.Context, request *api.DeleteFileReq) (*api.DeleteFileRes, error)

func (*Service) Echo

func (service *Service) Echo(ctx context.Context, request *empty.Empty) (*api.EchoRes, error)

func (*Service) Environments

func (service *Service) Environments(ctx context.Context, request *empty.Empty) (*api.EnvironmentsRes, error)

func (*Service) Exit

func (service *Service) Exit(ctx context.Context, request *api.ExitReq) (*empty.Empty, error)

func (*Service) Info

func (service *Service) Info(ctx context.Context, request *empty.Empty) (*api.InfoRes, error)

func (*Service) Latency

func (service *Service) Latency(ctx context.Context, request *api.LatencyReq) (*empty.Empty, error)

func (*Service) ListFiles

func (service *Service) ListFiles(ctx context.Context, request *api.ListFilesReq) (*api.ListFilesRes, error)

func (*Service) Log

func (service *Service) Log(ctx context.Context, request *api.LogReq) (*empty.Empty, error)

func (*Service) Panic

func (service *Service) Panic(ctx context.Context, request *empty.Empty) (*empty.Empty, error)

func (*Service) Ping

func (service *Service) Ping(ctx context.Context, request *empty.Empty) (*empty.Empty, error)

func (*Service) ReadFile

func (service *Service) ReadFile(ctx context.Context, request *api.ReadFileReq) (*api.ReadFileRes, error)

func (*Service) Request

func (service *Service) Request(ctx context.Context, request *api.RequestReq) (*api.RequestRes, error)

func (*Service) Run

func (service *Service) Run()

Run starts the service

func (*Service) WriteFile

func (service *Service) WriteFile(ctx context.Context, request *api.WriteFileReq) (*empty.Empty, error)

Jump to

Keyboard shortcuts

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