grpc

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONContentType = "application/json"
)
View Source
const Separator = ":"

Variables

View Source
var ComponentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kubefox.proto.v1.ComponentService",
	HandlerType: (*ComponentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InvokeTarget",
			Handler:    _ComponentService_InvokeTarget_Handler,
		},
		{
			MethodName: "SendResponse",
			Handler:    _ComponentService_SendResponse_Handler,
		},
		{
			MethodName: "Unsubscribe",
			Handler:    _ComponentService_Unsubscribe_Handler,
		},
		{
			MethodName: "GetConfig",
			Handler:    _ComponentService_GetConfig_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _ComponentService_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "kubefox.proto",
}

ComponentService_ServiceDesc is the grpc.ServiceDesc for ComponentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var (
	ErrUnknownContentType = errors.New("unknown content type")
)
View Source
var File_kubefox_proto protoreflect.FileDescriptor
View Source
var PlatformService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kubefox.proto.v1.PlatformService",
	HandlerType: (*PlatformServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Invoke",
			Handler:    _PlatformService_Invoke_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kubefox.proto",
}

PlatformService_ServiceDesc is the grpc.ServiceDesc for PlatformService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterComponentServiceServer

func RegisterComponentServiceServer(s grpc.ServiceRegistrar, srv ComponentServiceServer)

func RegisterPlatformServiceServer

func RegisterPlatformServiceServer(s grpc.ServiceRegistrar, srv PlatformServiceServer)

Types

type Ack

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

func (*Ack) Descriptor deprecated

func (*Ack) Descriptor() ([]byte, []int)

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

func (x *Ack) ProtoReflect() protoreflect.Message

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type Component

type Component struct {
	App     string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	GitHash string `protobuf:"bytes,3,opt,name=git_hash,json=gitHash,proto3" json:"git_hash,omitempty"`
	Id      string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Component) Descriptor deprecated

func (*Component) Descriptor() ([]byte, []int)

Deprecated: Use Component.ProtoReflect.Descriptor instead.

func (*Component) GetApp

func (x *Component) GetApp() string

func (*Component) GetAsyncConsumer

func (c *Component) GetAsyncConsumer() string

func (*Component) GetAsyncSubject

func (c *Component) GetAsyncSubject() string

func (*Component) GetGitHash

func (x *Component) GetGitHash() string

func (*Component) GetHTTPKey

func (c *Component) GetHTTPKey() string

func (*Component) GetId

func (x *Component) GetId() string

func (*Component) GetKey

func (c *Component) GetKey() string

func (*Component) GetName

func (x *Component) GetName() string

func (*Component) GetRequestConsumer

func (c *Component) GetRequestConsumer() string

func (*Component) GetRequestSubject

func (c *Component) GetRequestSubject() string

func (*Component) GetResponseConsumer

func (c *Component) GetResponseConsumer() string

func (*Component) GetResponseSubject

func (c *Component) GetResponseSubject() string

func (*Component) GetStream

func (c *Component) GetStream() string

func (*Component) GetSubjectWildcard

func (c *Component) GetSubjectWildcard() string

func (*Component) GetURI

func (c *Component) GetURI() string

func (*Component) ProtoMessage

func (*Component) ProtoMessage()

func (*Component) ProtoReflect

func (x *Component) ProtoReflect() protoreflect.Message

func (*Component) Reset

func (x *Component) Reset()

func (*Component) SetApp

func (c *Component) SetApp(val string)

func (*Component) SetGitHash

func (c *Component) SetGitHash(val string)

func (*Component) SetId

func (c *Component) SetId(val string)

func (*Component) SetName

func (c *Component) SetName(val string)

func (*Component) String

func (x *Component) String() string

type ComponentConfig

type ComponentConfig struct {

	// string organization = 1;
	Platform  string     `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"`
	DevMode   bool       `protobuf:"varint,3,opt,name=dev_mode,json=devMode,proto3" json:"dev_mode,omitempty"`
	Component *Component `protobuf:"bytes,14,opt,name=component,proto3" json:"component,omitempty"`
	// contains filtered or unexported fields
}

func (*ComponentConfig) Descriptor deprecated

func (*ComponentConfig) Descriptor() ([]byte, []int)

Deprecated: Use ComponentConfig.ProtoReflect.Descriptor instead.

func (*ComponentConfig) GetComponent

func (x *ComponentConfig) GetComponent() *Component

func (*ComponentConfig) GetDevMode

func (x *ComponentConfig) GetDevMode() bool

func (*ComponentConfig) GetPlatform

func (x *ComponentConfig) GetPlatform() string

func (*ComponentConfig) ProtoMessage

func (*ComponentConfig) ProtoMessage()

func (*ComponentConfig) ProtoReflect

func (x *ComponentConfig) ProtoReflect() protoreflect.Message

func (*ComponentConfig) Reset

func (x *ComponentConfig) Reset()

func (*ComponentConfig) String

func (x *ComponentConfig) String() string

type ComponentServiceClient

type ComponentServiceClient interface {
	InvokeTarget(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error)
	SendResponse(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Ack, error)
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ComponentService_SubscribeClient, error)
	Unsubscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*Ack, error)
	GetConfig(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (*ComponentConfig, error)
}

ComponentServiceClient is the client API for ComponentService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ComponentServiceServer

type ComponentServiceServer interface {
	InvokeTarget(context.Context, *Data) (*Data, error)
	SendResponse(context.Context, *Data) (*Ack, error)
	Subscribe(*SubscribeRequest, ComponentService_SubscribeServer) error
	Unsubscribe(context.Context, *SubscribeRequest) (*Ack, error)
	GetConfig(context.Context, *ConfigRequest) (*ComponentConfig, error)
	// contains filtered or unexported methods
}

ComponentServiceServer is the server API for ComponentService service. All implementations must embed UnimplementedComponentServiceServer for forward compatibility

type ComponentService_SubscribeClient

type ComponentService_SubscribeClient interface {
	Recv() (*Data, error)
	grpc.ClientStream
}

type ComponentService_SubscribeServer

type ComponentService_SubscribeServer interface {
	Send(*Data) error
	grpc.ServerStream
}

type ConfigRequest

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

func (*ConfigRequest) Descriptor deprecated

func (*ConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead.

func (*ConfigRequest) ProtoMessage

func (*ConfigRequest) ProtoMessage()

func (*ConfigRequest) ProtoReflect

func (x *ConfigRequest) ProtoReflect() protoreflect.Message

func (*ConfigRequest) Reset

func (x *ConfigRequest) Reset()

func (*ConfigRequest) String

func (x *ConfigRequest) String() string

type Data

type Data struct {
	Type        string                     `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Id          string                     `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	ParentId    string                     `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	Context     *EventContext              `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
	Fabric      *Fabric                    `protobuf:"bytes,5,opt,name=fabric,proto3" json:"fabric,omitempty"`
	Token       *Token                     `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"`
	Args        map[string]*structpb.Value `` /* 149-byte string literal not displayed */
	Values      map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	Span        *Span                      `protobuf:"bytes,9,opt,name=span,proto3" json:"span,omitempty"`
	Source      *Component                 `protobuf:"bytes,10,opt,name=source,proto3" json:"source,omitempty"`
	Target      *Component                 `protobuf:"bytes,11,opt,name=target,proto3" json:"target,omitempty"`
	ContentType string                     `protobuf:"bytes,14,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Content     []byte                     `protobuf:"bytes,15,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

func (*Data) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetArg

func (d *Data) GetArg(name string) string

func (*Data) GetArgProto

func (d *Data) GetArgProto(name string) *structpb.Value

func (*Data) GetArgVar

func (d *Data) GetArgVar(name string) *common.Var

func (*Data) GetArgs

func (x *Data) GetArgs() map[string]*structpb.Value

func (*Data) GetContent

func (x *Data) GetContent() []byte

func (*Data) GetContentType

func (x *Data) GetContentType() string

func (*Data) GetContext

func (x *Data) GetContext() *EventContext

func (*Data) GetErrorMsg

func (d *Data) GetErrorMsg() string

func (*Data) GetFabric

func (x *Data) GetFabric() *Fabric

func (*Data) GetId

func (x *Data) GetId() string

func (*Data) GetParentId

func (x *Data) GetParentId() string

func (*Data) GetSource

func (x *Data) GetSource() *Component

func (*Data) GetSpan

func (x *Data) GetSpan() *Span

func (*Data) GetTarget

func (x *Data) GetTarget() *Component

func (*Data) GetToken

func (x *Data) GetToken() *Token

func (*Data) GetType

func (x *Data) GetType() string

func (*Data) GetValue

func (d *Data) GetValue(name string) string

func (*Data) GetValueProto

func (d *Data) GetValueProto(name string) *structpb.Value

func (*Data) GetValueVar

func (d *Data) GetValueVar(name string) *common.Var

func (*Data) GetValues

func (x *Data) GetValues() map[string]*structpb.Value

func (*Data) Marshal

func (d *Data) Marshal(v any) error

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) SetArg

func (d *Data) SetArg(k string, v string)

func (*Data) SetArgNumber

func (d *Data) SetArgNumber(k string, v float64)

func (*Data) SetArgProto

func (d *Data) SetArgProto(name string, val *structpb.Value)

func (*Data) SetContent

func (d *Data) SetContent(content []byte)

func (*Data) SetContentType

func (d *Data) SetContentType(contentType string)

func (*Data) SetContext

func (d *Data) SetContext(ctx *EventContext)

func (*Data) SetErrorMsg

func (d *Data) SetErrorMsg(v string)

func (*Data) SetFabric

func (d *Data) SetFabric(fabric *Fabric)

func (*Data) SetParentId

func (d *Data) SetParentId(id string)

func (*Data) SetSource

func (d *Data) SetSource(source *Component)

func (*Data) SetSpan

func (d *Data) SetSpan(span *Span)

func (*Data) SetTarget

func (d *Data) SetTarget(target *Component)

func (*Data) SetToken

func (d *Data) SetToken(token jwt.Token)

func (*Data) SetType

func (d *Data) SetType(dataType string)

func (*Data) SetValue

func (d *Data) SetValue(k string, v string)

func (*Data) SetValueNumber

func (d *Data) SetValueNumber(k string, v float64)

func (*Data) SetValueProto

func (d *Data) SetValueProto(name string, val *structpb.Value)

func (*Data) String

func (x *Data) String() string

func (*Data) Unmarshal

func (d *Data) Unmarshal(v any) error

func (*Data) UnmarshalStrict

func (d *Data) UnmarshalStrict(v any) error

func (*Data) UpdateSpan

func (d *Data) UpdateSpan(span trace.Span)

type EventContext

type EventContext struct {

	// string organization = 1;
	Platform    string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"`
	Environment string `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"`
	System      string `protobuf:"bytes,4,opt,name=system,proto3" json:"system,omitempty"`
	App         string `protobuf:"bytes,5,opt,name=app,proto3" json:"app,omitempty"`
	// contains filtered or unexported fields
}

func (*EventContext) Descriptor deprecated

func (*EventContext) Descriptor() ([]byte, []int)

Deprecated: Use EventContext.ProtoReflect.Descriptor instead.

func (*EventContext) GetApp

func (x *EventContext) GetApp() string

func (*EventContext) GetEnvironment

func (x *EventContext) GetEnvironment() string

func (*EventContext) GetPlatform

func (x *EventContext) GetPlatform() string

func (*EventContext) GetSystem

func (x *EventContext) GetSystem() string

func (*EventContext) ProtoMessage

func (*EventContext) ProtoMessage()

func (*EventContext) ProtoReflect

func (x *EventContext) ProtoReflect() protoreflect.Message

func (*EventContext) Reset

func (x *EventContext) Reset()

func (*EventContext) String

func (x *EventContext) String() string

type Fabric

type Fabric struct {
	Config  map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	Secrets map[string]*structpb.Value `` /* 155-byte string literal not displayed */
	EnvVars map[string]*structpb.Value `` /* 170-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Fabric) Descriptor deprecated

func (*Fabric) Descriptor() ([]byte, []int)

Deprecated: Use Fabric.ProtoReflect.Descriptor instead.

func (*Fabric) GetConfig

func (x *Fabric) GetConfig() map[string]*structpb.Value

func (*Fabric) GetEnvVars

func (x *Fabric) GetEnvVars() map[string]*structpb.Value

func (*Fabric) GetSecrets

func (x *Fabric) GetSecrets() map[string]*structpb.Value

func (*Fabric) ProtoMessage

func (*Fabric) ProtoMessage()

func (*Fabric) ProtoReflect

func (x *Fabric) ProtoReflect() protoreflect.Message

func (*Fabric) Reset

func (x *Fabric) Reset()

func (*Fabric) String

func (x *Fabric) String() string

type PlatformServiceClient

type PlatformServiceClient interface {
	Invoke(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error)
}

PlatformServiceClient is the client API for PlatformService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type PlatformServiceServer

type PlatformServiceServer interface {
	Invoke(context.Context, *Data) (*Data, error)
	// contains filtered or unexported methods
}

PlatformServiceServer is the server API for PlatformService service. All implementations must embed UnimplementedPlatformServiceServer for forward compatibility

type Span

type Span struct {
	TraceId    string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	SpanId     string `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	TraceFlags []byte `protobuf:"bytes,3,opt,name=trace_flags,json=traceFlags,proto3" json:"trace_flags,omitempty"`
	// contains filtered or unexported fields
}

func (*Span) Descriptor deprecated

func (*Span) Descriptor() ([]byte, []int)

Deprecated: Use Span.ProtoReflect.Descriptor instead.

func (*Span) GetSpanId

func (x *Span) GetSpanId() string

func (*Span) GetTraceFlags

func (x *Span) GetTraceFlags() []byte

func (*Span) GetTraceId

func (x *Span) GetTraceId() string

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) ProtoReflect

func (x *Span) ProtoReflect() protoreflect.Message

func (*Span) Reset

func (x *Span) Reset()

func (*Span) String

func (x *Span) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

func (*SubscribeRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetId

func (x *SubscribeRequest) GetId() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

func (x *SubscribeRequest) ProtoReflect() protoreflect.Message

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type TelemetryRequest

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

func (*TelemetryRequest) Descriptor deprecated

func (*TelemetryRequest) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryRequest.ProtoReflect.Descriptor instead.

func (*TelemetryRequest) ProtoMessage

func (*TelemetryRequest) ProtoMessage()

func (*TelemetryRequest) ProtoReflect

func (x *TelemetryRequest) ProtoReflect() protoreflect.Message

func (*TelemetryRequest) Reset

func (x *TelemetryRequest) Reset()

func (*TelemetryRequest) String

func (x *TelemetryRequest) String() string

type TelemetryResponse

type TelemetryResponse struct {
	Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
	// contains filtered or unexported fields
}

func (*TelemetryResponse) Descriptor deprecated

func (*TelemetryResponse) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryResponse.ProtoReflect.Descriptor instead.

func (*TelemetryResponse) GetHealthy

func (x *TelemetryResponse) GetHealthy() bool

func (*TelemetryResponse) ProtoMessage

func (*TelemetryResponse) ProtoMessage()

func (*TelemetryResponse) ProtoReflect

func (x *TelemetryResponse) ProtoReflect() protoreflect.Message

func (*TelemetryResponse) Reset

func (x *TelemetryResponse) Reset()

func (*TelemetryResponse) String

func (x *TelemetryResponse) String() string

type Token

type Token struct {
	Id            string                     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Issuer        string                     `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
	Subject       string                     `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	Audience      []string                   `protobuf:"bytes,4,rep,name=audience,proto3" json:"audience,omitempty"`
	IssuedAt      *timestamppb.Timestamp     `protobuf:"bytes,5,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`
	NotBefore     *timestamppb.Timestamp     `protobuf:"bytes,6,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"`
	Expiration    *timestamppb.Timestamp     `protobuf:"bytes,7,opt,name=expiration,proto3" json:"expiration,omitempty"`
	PrivateClaims map[string]*structpb.Value `` /* 189-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAudience

func (x *Token) GetAudience() []string

func (*Token) GetExpiration

func (x *Token) GetExpiration() *timestamppb.Timestamp

func (*Token) GetId

func (x *Token) GetId() string

func (*Token) GetIssuedAt

func (x *Token) GetIssuedAt() *timestamppb.Timestamp

func (*Token) GetIssuer

func (x *Token) GetIssuer() string

func (*Token) GetNotBefore

func (x *Token) GetNotBefore() *timestamppb.Timestamp

func (*Token) GetPrivateClaims

func (x *Token) GetPrivateClaims() map[string]*structpb.Value

func (*Token) GetSubject

func (x *Token) GetSubject() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type UnimplementedComponentServiceServer

type UnimplementedComponentServiceServer struct {
}

UnimplementedComponentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedComponentServiceServer) GetConfig

func (UnimplementedComponentServiceServer) InvokeTarget

func (UnimplementedComponentServiceServer) SendResponse

func (UnimplementedComponentServiceServer) Subscribe

func (UnimplementedComponentServiceServer) Unsubscribe

type UnimplementedPlatformServiceServer

type UnimplementedPlatformServiceServer struct {
}

UnimplementedPlatformServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPlatformServiceServer) Invoke

type UnsafeComponentServiceServer

type UnsafeComponentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeComponentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ComponentServiceServer will result in compilation errors.

type UnsafePlatformServiceServer

type UnsafePlatformServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePlatformServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PlatformServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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