starlarkgrpc

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Status = starlarkstruct.FromStringDict(
	Symbol("grpc.status"),
	starlark.StringDict{
		"OK":                 starlark.MakeInt(int(codes.OK)),
		"CANCELED":           starlark.MakeInt(int(codes.Canceled)),
		"UNKNOWN":            starlark.MakeInt(int(codes.Unknown)),
		"INVALIDARGUMENT":    starlark.MakeInt(int(codes.InvalidArgument)),
		"DEADLINEEXCEEDED":   starlark.MakeInt(int(codes.DeadlineExceeded)),
		"NOTFOUND":           starlark.MakeInt(int(codes.NotFound)),
		"ALREADYEXISTS":      starlark.MakeInt(int(codes.AlreadyExists)),
		"PERMISSIONDENIED":   starlark.MakeInt(int(codes.PermissionDenied)),
		"RESOURCEEXHAUSTED":  starlark.MakeInt(int(codes.ResourceExhausted)),
		"FAILEDPRECONDITION": starlark.MakeInt(int(codes.FailedPrecondition)),
		"ABORTED":            starlark.MakeInt(int(codes.Aborted)),
		"OUTOFRANGE":         starlark.MakeInt(int(codes.OutOfRange)),
		"UNIMPLEMENTED":      starlark.MakeInt(int(codes.Unimplemented)),
		"INTERNAL":           starlark.MakeInt(int(codes.Internal)),
		"UNAVAILABLE":        starlark.MakeInt(int(codes.Unavailable)),
		"DATALOSS":           starlark.MakeInt(int(codes.DataLoss)),
		"UNAUTHENTICATED":    starlark.MakeInt(int(codes.Unauthenticated)),
	},
)

Functions

func NewModule

func NewModule(files *protoregistry.Files) *starlarkstruct.Module

Types

type Handler

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

Handler represents a rule implemented in starlark that implements the GrpcHandler.

func (*Handler) HandleStream added in v0.2.0

func (h *Handler) HandleStream(srv interface{}, ss grpc.ServerStream) error

HandleStream implements grpc.StreamHandler for handling of server-streaming calls.

func (*Handler) Name

func (h *Handler) Name() string

type HandlerMap

type HandlerMap map[string]*Handler

HandlerMap is a map of Handler implementations keyed by method fullname.

type HandlerRegistrationFunction

type HandlerRegistrationFunction func(handler *Handler) error

type Symbol

type Symbol string

Symbol is the type of a Starlark constructor symbol. It prints more favorably than a starlark.String.

func (Symbol) Freeze

func (s Symbol) Freeze()

func (Symbol) GoString

func (s Symbol) GoString() string

func (Symbol) Hash

func (s Symbol) Hash() (uint32, error)

func (Symbol) Index

func (s Symbol) Index(i int) starlark.Value

func (Symbol) Len

func (s Symbol) Len() int

func (Symbol) String

func (s Symbol) String() string

func (Symbol) Truth

func (s Symbol) Truth() starlark.Bool

func (Symbol) Type

func (s Symbol) Type() string

Jump to

Keyboard shortcuts

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