endpoint

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupIPv4

func LookupIPv4(endpoint string) string

func NewPKIResolver

func NewPKIResolver() *pkiResolver

func NewResolverService

func NewResolverService(config ConfigService, service Service, is IdentityService) (*resolverService, error)

NewResolverService returns a new instance of the view-sdk endpoint resolverService

func NewService

func NewService(sp view2.ServiceProvider, discovery Discovery, kvs KVS) (*service, error)

NewService returns a new instance of the view-sdk endpoint service

Types

type ConfigService

type ConfigService interface {
	GetString(key string) string
	IsSet(s string) bool
	UnmarshalKey(s string, i interface{}) error
	TranslatePath(path string) string
}

type Discovery

type Discovery interface {
	Peers() []NetworkMember
}

type Identity

type Identity struct {
	Path string `yaml:"path"`
}

type IdentityService

type IdentityService interface {
	DefaultIdentity() view.Identity
}

type KVS

type KVS interface {
	Exists(id string) bool
	Put(id string, state interface{}) error
	Get(id string, state interface{}) error
}

type NetworkMember

type NetworkMember struct {
	Endpoint         string
	Metadata         []byte
	PKIid            []byte
	InternalEndpoint string
}

NetworkMember is a peer's representation

type Service

type Service interface {
	Bind(longTerm view.Identity, ephemeral view.Identity) error
	AddResolver(name string, domain string, addresses map[string]string, aliases []string, id []byte) (view.Identity, error)
	AddPKIResolver(resolver view2.PKIResolver) error
}

Jump to

Keyboard shortcuts

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