embedportal

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Overview

Embedportal lets you run the portal binary main function inside another program

This is used by ask.systems/daemon, but feel free to use it if you want to!

Index

Constants

This section is empty.

Variables

View Source
var (
	FixedPortTakenErr = errors.New("Requested fixed port is already taken!")
	UnregisteredErr   = errors.New("The requested lease was not previously registered.")
	InvalidLeaseErr   = errors.New("The requested lease does not match the lease we have on record for this port.")
)
View Source
var File_embedportal_storage_proto protoreflect.FileDescriptor

Functions

func Run

func Run(flags *flag.FlagSet, args []string)

Types

type Registration

type Registration struct {
	Request *gate.RegisterRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// Note: the Certificate field is not filled in the stored copy because it is
	// not passed through. It could have been done but it wasn't necessary.
	Lease *gate.Lease `protobuf:"bytes,2,opt,name=lease,proto3" json:"lease,omitempty"`
	// contains filtered or unexported fields
}

func (*Registration) Descriptor deprecated

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

Deprecated: Use Registration.ProtoReflect.Descriptor instead.

func (*Registration) GetLease

func (x *Registration) GetLease() *gate.Lease

func (*Registration) GetRequest

func (x *Registration) GetRequest() *gate.RegisterRequest

func (*Registration) ProtoMessage

func (*Registration) ProtoMessage()

func (*Registration) ProtoReflect

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

func (*Registration) Reset

func (x *Registration) Reset()

func (*Registration) String

func (x *Registration) String() string

type State

type State struct {
	Registrations []*Registration `protobuf:"bytes,1,rep,name=registrations,proto3" json:"registrations,omitempty"`
	RootCAs       [][]byte        `protobuf:"bytes,2,rep,name=rootCAs,proto3" json:"rootCAs,omitempty"`
	ApiToken      string          `protobuf:"bytes,3,opt,name=api_token,json=apiToken,proto3" json:"api_token,omitempty"`
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetApiToken

func (x *State) GetApiToken() string

func (*State) GetRegistrations

func (x *State) GetRegistrations() []*Registration

func (*State) GetRootCAs

func (x *State) GetRootCAs() [][]byte

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

Jump to

Keyboard shortcuts

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