shared

package
v0.0.0-...-dcdbaa1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	RPCType_name = map[int32]string{
		0: "UNKNOWN_RPC",
		1: "GRPC",
		2: "WEBSOCKET",
		3: "JSON_RPC",
		4: "REST",
	}
	RPCType_value = map[string]int32{
		"UNKNOWN_RPC": 0,
		"GRPC":        1,
		"WEBSOCKET":   2,
		"JSON_RPC":    3,
		"REST":        4,
	}
)

Enum value maps for RPCType.

View Source
var (
	ConfigOptions_name = map[int32]string{
		0: "UNKNOWN_CONFIG",
		1: "TIMEOUT",
	}
	ConfigOptions_value = map[string]int32{
		"UNKNOWN_CONFIG": 0,
		"TIMEOUT":        1,
	}
)

Enum value maps for ConfigOptions.

View Source
var File_poktroll_shared_service_proto protoreflect.FileDescriptor
View Source
var File_poktroll_shared_supplier_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ApplicationServiceConfig

type ApplicationServiceConfig struct {
	Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // The Service for which the application is configured
	// contains filtered or unexported fields
}

ApplicationServiceConfig holds the service configuration the application stakes for

func (*ApplicationServiceConfig) Descriptor deprecated

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

Deprecated: Use ApplicationServiceConfig.ProtoReflect.Descriptor instead.

func (*ApplicationServiceConfig) GetService

func (x *ApplicationServiceConfig) GetService() *Service

func (*ApplicationServiceConfig) ProtoMessage

func (*ApplicationServiceConfig) ProtoMessage()

func (*ApplicationServiceConfig) ProtoReflect

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

func (*ApplicationServiceConfig) Reset

func (x *ApplicationServiceConfig) Reset()

func (*ApplicationServiceConfig) String

func (x *ApplicationServiceConfig) String() string

type ConfigOption

type ConfigOption struct {
	Key   ConfigOptions `protobuf:"varint,1,opt,name=key,proto3,enum=poktroll.shared.ConfigOptions" json:"key,omitempty"` // Config option key
	Value string        `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`                                 // Config option value
	// contains filtered or unexported fields
}

Key-value wrapper for config options, as proto maps can't be keyed by enums

func (*ConfigOption) Descriptor deprecated

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

Deprecated: Use ConfigOption.ProtoReflect.Descriptor instead.

func (*ConfigOption) GetKey

func (x *ConfigOption) GetKey() ConfigOptions

func (*ConfigOption) GetValue

func (x *ConfigOption) GetValue() string

func (*ConfigOption) ProtoMessage

func (*ConfigOption) ProtoMessage()

func (*ConfigOption) ProtoReflect

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

func (*ConfigOption) Reset

func (x *ConfigOption) Reset()

func (*ConfigOption) String

func (x *ConfigOption) String() string

type ConfigOptions

type ConfigOptions int32

Enum to define configuration options TODO_RESEARCH: Should these be configs, SLAs or something else? There will be more discussion once we get closer to implementing on-chain QoS.

const (
	ConfigOptions_UNKNOWN_CONFIG ConfigOptions = 0 // Undefined config option
	ConfigOptions_TIMEOUT        ConfigOptions = 1 // Timeout setting
)

func (ConfigOptions) Descriptor

func (ConfigOptions) Enum

func (x ConfigOptions) Enum() *ConfigOptions

func (ConfigOptions) EnumDescriptor deprecated

func (ConfigOptions) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfigOptions.Descriptor instead.

func (ConfigOptions) Number

func (ConfigOptions) String

func (x ConfigOptions) String() string

func (ConfigOptions) Type

type RPCType

type RPCType int32

Enum to define RPC types

const (
	RPCType_UNKNOWN_RPC RPCType = 0 // Undefined RPC type
	RPCType_GRPC        RPCType = 1 // gRPC
	RPCType_WEBSOCKET   RPCType = 2 // WebSocket
	RPCType_JSON_RPC    RPCType = 3 // JSON-RPC
	RPCType_REST        RPCType = 4 // REST
)

func (RPCType) Descriptor

func (RPCType) Descriptor() protoreflect.EnumDescriptor

func (RPCType) Enum

func (x RPCType) Enum() *RPCType

func (RPCType) EnumDescriptor deprecated

func (RPCType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RPCType.Descriptor instead.

func (RPCType) Number

func (x RPCType) Number() protoreflect.EnumNumber

func (RPCType) String

func (x RPCType) String() string

func (RPCType) Type

func (RPCType) Type() protoreflect.EnumType

type Service

type Service struct {

	// For example, what if we want to request a session for a certain service but with some additional configs that identify it?
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the service
	// TODO_TECHDEBT: Name is currently unused but acts as a reminder that an optional onchain representation of the service is necessary
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // (Optional) Semantic human readable name for the service
	// contains filtered or unexported fields
}

Service message to encapsulate unique and semantic identifiers for a service on the network

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetId

func (x *Service) GetId() string

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

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

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type Supplier

type Supplier struct {
	Address  string                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`   // The Bech32 address of the supplier using cosmos' ScalarDescriptor to ensure deterministic encoding
	Stake    *v1beta1.Coin            `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"`       // The total amount of uPOKT the supplier has staked
	Services []*SupplierServiceConfig `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"` // The service configs this supplier can support
	// contains filtered or unexported fields
}

Supplier is the type defining the actor in Pocket Network that provides RPC services.

func (*Supplier) Descriptor deprecated

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

Deprecated: Use Supplier.ProtoReflect.Descriptor instead.

func (*Supplier) GetAddress

func (x *Supplier) GetAddress() string

func (*Supplier) GetServices

func (x *Supplier) GetServices() []*SupplierServiceConfig

func (*Supplier) GetStake

func (x *Supplier) GetStake() *v1beta1.Coin

func (*Supplier) ProtoMessage

func (*Supplier) ProtoMessage()

func (*Supplier) ProtoReflect

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

func (*Supplier) Reset

func (x *Supplier) Reset()

func (*Supplier) String

func (x *Supplier) String() string

type SupplierEndpoint

type SupplierEndpoint struct {
	Url     string          `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`                                                      // URL of the endpoint
	RpcType RPCType         `protobuf:"varint,2,opt,name=rpc_type,json=rpcType,proto3,enum=poktroll.shared.RPCType" json:"rpc_type,omitempty"` // Type of RPC exposed on the url above
	Configs []*ConfigOption `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`                                              // Additional configuration options for the endpoint
	// contains filtered or unexported fields
}

SupplierEndpoint message to hold service configuration details

func (*SupplierEndpoint) Descriptor deprecated

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

Deprecated: Use SupplierEndpoint.ProtoReflect.Descriptor instead.

func (*SupplierEndpoint) GetConfigs

func (x *SupplierEndpoint) GetConfigs() []*ConfigOption

func (*SupplierEndpoint) GetRpcType

func (x *SupplierEndpoint) GetRpcType() RPCType

func (*SupplierEndpoint) GetUrl

func (x *SupplierEndpoint) GetUrl() string

func (*SupplierEndpoint) ProtoMessage

func (*SupplierEndpoint) ProtoMessage()

func (*SupplierEndpoint) ProtoReflect

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

func (*SupplierEndpoint) Reset

func (x *SupplierEndpoint) Reset()

func (*SupplierEndpoint) String

func (x *SupplierEndpoint) String() string

type SupplierServiceConfig

type SupplierServiceConfig struct {
	Service   *Service            `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`     // The Service for which the supplier is configured
	Endpoints []*SupplierEndpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // List of endpoints for the service
	// contains filtered or unexported fields
}

SupplierServiceConfig holds the service configuration the supplier stakes for

func (*SupplierServiceConfig) Descriptor deprecated

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

Deprecated: Use SupplierServiceConfig.ProtoReflect.Descriptor instead.

func (*SupplierServiceConfig) GetEndpoints

func (x *SupplierServiceConfig) GetEndpoints() []*SupplierEndpoint

func (*SupplierServiceConfig) GetService

func (x *SupplierServiceConfig) GetService() *Service

func (*SupplierServiceConfig) ProtoMessage

func (*SupplierServiceConfig) ProtoMessage()

func (*SupplierServiceConfig) ProtoReflect

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

func (*SupplierServiceConfig) Reset

func (x *SupplierServiceConfig) Reset()

func (*SupplierServiceConfig) String

func (x *SupplierServiceConfig) String() string

Jump to

Keyboard shortcuts

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