istio: istio.io/istio/pilot/pkg/util/sets Index | Files

package sets

import "istio.io/istio/pilot/pkg/util/sets"

Index

Package Files

string.go

type Set Uses

type Set map[string]struct{}

func NewSet Uses

func NewSet(items ...string) Set

NewSet creates a Set from a list of values.

func (Set) Contains Uses

func (s Set) Contains(item string) bool

Contains returns whether the given item is in the set.

func (Set) Delete Uses

func (s Set) Delete(items ...string) Set

Delete removes items from the set.

func (Set) Difference Uses

func (s Set) Difference(s2 Set) Set

Difference returns a set of objects that are not in s2 For example: s = {a1, a2, a3} s2 = {a1, a2, a4, a5} s.Difference(s2) = {a3} s2.Difference(s) = {a4, a5}

func (Set) Equals Uses

func (s Set) Equals(other Set) bool

Equals checks whether the given set is equal to the current set.

func (Set) Insert Uses

func (s Set) Insert(items ...string) Set

Insert adds items to the set.

func (Set) UnsortedList Uses

func (s Set) UnsortedList() []string

UnsortedList returns the slice with contents in random order.

Package sets is imported by 13 packages. Updated 2021-01-07. Refresh now. Tools for package owners.