pathinfo

package
v0.0.0-...-302cdf8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DiskBasedStreamConfig = nats.StreamConfig{
		Name: "path_info_store",
		Subjects: []string{
			subject.WithPrefix("STORE.PATH_INFO.*"),
			subject.WithPrefix("STORE.PATH_INFO_OUT_IDX.*"),
		},
		Replicas:          1,
		Discard:           nats.DiscardOld,
		MaxMsgsPerSubject: 1,
		Storage:           nats.FileStorage,
		AllowRollup:       true,
		AllowDirect:       true,
		Compression:       nats.S2Compression,

		RePublish: &nats.RePublish{
			Source:      subject.WithPrefix("STORE.*.*"),
			Destination: subject.WithPrefix("CACHE.{{wildcard(1)}}.{{wildcard(2)}}"),
		},
	}

	MemoryBasedStreamConfig = nats.StreamConfig{
		Name: "path_info_cache",
		Subjects: []string{
			subject.WithPrefix("CACHE.PATH_INFO.*"),
			subject.WithPrefix("CACHE.PATH_INFO_OUT_IDX.*"),
		},
		Replicas:          1,
		Discard:           nats.DiscardOld,
		MaxMsgsPerSubject: 1,
		MaxBytes:          1024 * 1024 * 128,
		Storage:           nats.MemoryStorage,
		AllowRollup:       true,
		AllowDirect:       true,
	}
)

Functions

func NewPathInfoOutIdxStore

func NewPathInfoOutIdxStore(conn *nats.Conn) store.Store

func NewPathInfoStore

func NewPathInfoStore(conn *nats.Conn) store.Store

Types

type Service

type Service struct {
	tvpb.UnimplementedPathInfoServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conn *nats.Conn, blob *blob.Server, directory *directory.Server) (*Service, error)

func (*Service) CalculateNAR

func (s *Service) CalculateNAR(ctx context.Context, node *capb.Node) (*tvpb.CalculateNARResponse, error)

func (*Service) Get

func (*Service) List

func (*Service) Put

func (s *Service) Put(ctx context.Context, pathInfo *tvpb.PathInfo) (*tvpb.PathInfo, error)

Jump to

Keyboard shortcuts

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