client

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "grpc_client"
	RequestPort   = "request"
	ResponsePort  = "response"
	ErrorPort     = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func (*Component) GetInfo

func (h *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (h *Component) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Component) Instance

func (h *Component) Instance() module.Component

func (*Component) Ports

func (h *Component) Ports() []module.Port

type Context

type Context any

type Enum

type Enum struct {
	Value   string
	Options []string
}

Enum special type which can carry its value and possible options for enum values

func (Enum) JSONSchema

func (r Enum) JSONSchema() (jsonschema.Schema, error)

func (Enum) MarshalJSON

func (r Enum) MarshalJSON() ([]byte, error)

MarshalJSON treat like underlying Value string

func (*Enum) UnmarshalJSON

func (r *Enum) UnmarshalJSON(data []byte) error

UnmarshalJSON treat like underlying Value string

type Error

type Error struct {
	Context Context `json:"context"`
	Error   string  `json:"error"`
}

type MessageDescriptor

type MessageDescriptor struct {
	Input      any
	Output     []byte
	Descriptor protoreflect.MessageDescriptor `json:"-"`
}

MessageDescriptor builds schema based on descriptor returns marshalled output data raw marshals data to input

func (MessageDescriptor) JSONSchema

func (r MessageDescriptor) JSONSchema() (jsonschema.Schema, error)

func (MessageDescriptor) MarshalJSON

func (r MessageDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON treat like underlying Value string

func (*MessageDescriptor) UnmarshalJSON

func (r *MessageDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON treat like underlying Value string

type MethodName

type MethodName struct {
	Enum
}

MethodName special type which can carry its value and possible options for enum values

type Request

type Request struct {
	Context Context    `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to be send alongside with encoded message"`
	Request RequestMsg `json:"request" required:"true" title:"Request message" description:""`
}

type RequestMsg

type RequestMsg struct {
	MessageDescriptor
}

type Response

type Response struct {
	Context  Context     `json:"context"`
	Response ResponseMsg `json:"response"`
}

type ResponseMsg

type ResponseMsg struct {
	MessageDescriptor
}

type ServiceName

type ServiceName struct {
	Enum
}

ServiceName special type which can carry its value and possible options for enum values

type Settings

type Settings struct {
	Address         string      `json:"address" title:"gRPC server address" required:"true" tab:"Connect"`
	Insecure        bool        `json:"insecure" title:"Insecure mode" default:"false" tab:"Connect"`
	KeepAlive       bool        `json:"keepAlive" title:"Keep Alive" default:"false" tab:"Connect"`
	Service         ServiceName `json:"service" title:"Service" description:"Name of the service" tab:"Request"`
	Method          MethodName  `json:"method" title:"Method" description:"Name of the gRPC method" tab:"Request"`
	EnableErrorPort bool        `` /* 147-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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