<commit_before>package manager

import (
	"net/http"
)

// Manager is the interface that integrates with pubsub manager UI.
type Manager interface {
	// Name of the manager implementation.
	Name() string

	Start() error
	Stop()

	// AuthAdmin check if an app with the key has admin rights.
	AuthAdmin(appid, pubkey string) (ok bool)

	// OwnTopic checks if an appid owns a topic.
	OwnTopic(appid, pubkey, topic string) error

	AllowSubWithUnregisteredGroup(bool)

	KafkaTopic(appid string, topic string, ver string) string
	ShadowTopic(shadow, myAppid, hisAppid, topic, ver, group string) string

	// AuthSub checks if an appid is able to consume message from hisAppid.hisTopic.
	AuthSub(appid, subkey, hisAppid, hisTopic, group string) error

	// LookupCluster locate the cluster name of an appid.<commit_msg>add godoc for important funcs<commit_after>package manager

import (
	"net/http"
)

// Manager is the interface that integrates with pubsub manager UI.
type Manager interface {
	// Name of the manager implementation.
	Name() string

	Start() error
	Stop()

	// AuthAdmin check if an app with the key has admin rights.
	AuthAdmin(appid, pubkey string) (ok bool)

	// OwnTopic checks if an appid owns a topic.
	OwnTopic(appid, pubkey, topic string) error

	AllowSubWithUnregisteredGroup(bool)

	// KafkaTopic returns raw kafka topic name.
	KafkaTopic(appid string, topic string, ver string) string

	// ShadowTopic returns raw kafka topic name of a shadowed topic.
	ShadowTopic(shadow, myAppid, hisAppid, topic, ver, group string) string

	// AuthSub checks if an appid is able to consume message from hisAppid.hisTopic.
	AuthSub(appid, subkey, hisAppid, hisTopic, group string) error

	// LookupCluster locate the cluster name of an appid.
{'fraction_non_alphanumeric': 0.07437070938215103, 'fraction_numerical': 0.0, 'mean_word_length': 4.236526946107785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3842222', 'n_tokens_mistral': 531, 'n_tokens_neox': 511, 'n_words': 217}